Created
April 25, 2014 10:37
-
-
Save rickrduncan/11285035 to your computer and use it in GitHub Desktop.
Order WordPress archive posts by "Title" in "Ascending" order for one specific category.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag | |
function b3m_before_loop () { | |
if( is_category( '1' ) ) { | |
global $query_string; | |
query_posts( wp_parse_args( $query_string, array( 'orderby' => 'title', 'order' => 'ASC' ) ) ); | |
} | |
} | |
add_action( 'genesis_before_loop', 'b3m_before_loop' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment