Hi all. I'm wondering if anyone can lend a hand with sorting posts alphabetically within the context of a category archive. I've tried using functions.php to filter the posts query, to no avail.
I've tried several different functions, the one below seems to be closest, though it returns ALL posts when browsing the category
function alphabetize_category($query) {
if ( $query->is_category('4'))
{
//print "query string:". $query_string;
//$query = query_posts('?cat=4&orderby=title&order=asc&posts_per_page=-1');
//print_r($query);
}
return $query;
}
add_filter('pre_get_posts', 'alphabetize_category');