Is there a possibility to hide certain categories from specific user roles? This must only affect the backend, especially the create post site.

On the frontend these "hidden" categories must not be hidden! There every category should be visible for all users, registered or not registered.

I tried the plugin "Role Scoper". But there is the problem, that hidden categories are hidden on the frontend, too..

  • This is a rather broad question and requires a lenghty code because Im not sure there's a specific action hook that can do that. Do you need this only on posts or do you want hide them on custom posts, attachments and pages as well? You probably need to: 1. Check user role 2. If restricted user, delete original meta, 3. Insert your own 4. Also handle saving of the category. – N00b Dec 18 '15 at 23:22
  • It should only affect the option for creating posts. Showing or hiding a certain category for a user group on the front end is no problem. But I need to hide it only in the backend. And only for posts. I want to prevent authors from writing posts to a main category and its sub-categories. – Brotzka Dec 18 '15 at 23:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.