I have my categories set to sort alphabetically:
<?php if (is_category()) {
$posts = query_posts($query_string . '&orderby=title&order=asc');
}
?>
I want to exclude one category so that it sorts by date. I tried this but it made all the cats come up blank:
<?php if (is_category()) {
$posts = query_posts($query_string . '&orderby=title&order=asc&exclude=15');
}
?>
Any ideas?
query_posts
should not be used. you should be usingWP_Query
orpre_get_posts
. In which template are you using this code