Excluding a Category by Name
-
Is it possible to exclude a category by name rather than id?
To exclude a category ID, I would say
query_posts('cat=-3');
And to post only a category, I would say
query_posts($query_string . '&category_name=featured');
Is there a way to use PHP to get a category name, and find the ID associated with it?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Excluding a Category by Name’ is closed to new replies.