Created
December 16, 2014 15:06
-
-
Save leepettijohn/36a735190bc536e48e2b to your computer and use it in GitHub Desktop.
Alphabetize
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
//Alphabetize the products | |
function modify_query_order( $query ) { | |
$cat = the_category_ID($echo=false); | |
if (is_category(8) || cat_is_ancestor_of(8,$cat)){ | |
global $query_string; | |
query_posts($query_string."&order=ASC&orderby=title"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment