Exclude category from archive list
-
Topic
-
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.
This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.
Is there a way to exclude a category from an archive listing? I know I can exclude categories from a blog page (with the right page type), but for the archives, how do I exclude them in there? Via the functions.php? If so, how?
Hello,
If you’re looking to modify queries of WordPress archives — i.e. archives by date, category, tag, etc — this isn’t really going to have anything to with what the theme is doing. This will be a customization you’ll need to do a little research on and make from either the functions.php of your child theme or your own plugin’s files. Most likely you’re going to want to filter pre_get_posts:
http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts