How to modify category.php to list posts alphabetically?
Try to do all theme modifications in functions.php whenever possible. It keeps the theme files clean and uncluttered. Here’s an example using the pre_get_posts action: function order_category_archives( $query ) { if ( is_category() && $query->is_main_query() ){ // is_category() can specify a category, if necessary $query->set( ‘orderby’, ‘title’ ); $query->set( ‘order’, ‘ASC’ ); } } add_action( … Read more