I want to get rid of some posts, old ones, that I don’t really want to keep. I was thinking to create a category named ‘old’ and use it as a garbage can to trash everything I don’t like from old posts.
Reason I don’t simply delete them is the google traffic. Some of those pages receive 1-2 visits a day, so why not leave them? just as adsense traffic 🙂
Anyhow.
Now I need a way to hide category ‘old’ from everywhere. I need a quick and dirty way to do this, preferably through functions.php – don’t want to change every menu listing and add -old.
I also want to exclude posts inside this category from being displayed in ‘related posts’ section. But for this I guess I will have to take a look in the plugin itself…
any help?
Thanks!
pre_get_posts
is the right hook for thissince i just did category exclusion in another answer i will post it here too.
Exclude the category from the WordPress loop
based on the codex sample:
http://codex.wordpress.org/Custom_Queries#Category_Exclusion
There’s a plugin for that 🙂
http://wordpress.org/extend/plugins/hide-categories/
can you try this, add in your function.php
replace -1 with your cat id
can you try again with a conditional tag
xx is your category