I have two categories which I dont want to show to my site’s admin, I want them to be added automatically everytime a new post is creatd or updated. I have the code for it. But now i also want to hide those two categories.
This is not for front-end. This is for wodpress dashboard. I dont want that admin will see these two categries at all. But if we hide those still I will be to assign two categories into posts.
Any clues???
Got an answer in the first version of this answer:
You need to create a custom taxonomy for your needs. You can hide it and it won’t be visible. Read more about custom taxonomies:
register_taxonomy
functionI found a plugin just now: http://wordpress.org/extend/plugins/restrict-categories/ which allow me to control which category will be displayed to which user and their roles. The good thing about this plugin is you can restrict categories not to show in admin mode where most of the other plugins will show everything in admin but has restriction to other users and their roles. I wanted something where i can hide two categories not to show in admin. so complete hidden from any users including admin.
This plugin does it.
Though categories can be hidden you can assign a post to that category automatically, so everytime a new post is published it assigns automatically to those hidden categories.
Nice one.
Ok find the solution. thanks to @brasofilo.
the code is as follows: