0

I am trying to associate custom categories created by different users to their userIDs. I did that with custom posts and custom pages, but I really have no idea on how I can do that with the custom post type categories.

This because I want that each user logged in can add his own categories only and cannot see categories added by others.

Any help is really appreciated!

Best

4
  • You've got a big project and will need substantial code. Try looking through the source of similar plugins to see what you are in for, and hopefully get a start.
    – s_ha_dum
    Commented Apr 29, 2015 at 18:02
  • I am also opened to another way to achieve this. Something like metafields populated like category or something else!
    – Mark
    Commented Apr 29, 2015 at 18:06
  • I know, but you are looking at substantial code. As is, this looks like a "work for me for free" question. There are numerous bits of functionality that will need to be altered via numerous hooks. That is a lot to ask. Please try to get yourself started or I suspect this will be closed as "too broad".
    – s_ha_dum
    Commented Apr 29, 2015 at 18:10
  • I asked just to have a hint, nothing "be my slave" alike. Just is there an easy way to achieve it as for the posts and pages? Yes/No. Using for example a mix of custom capabilities and force and user to read only things with his userID (as I did for posts and pages).
    – Mark
    Commented Apr 29, 2015 at 18:16

1 Answer 1

0

For your situation, ideal solution would be this plugin: Restrict Categories

It allows you to restrict the users to add, view and edit categories.

Note: But before installing, make sure you have a backup. The most recent review had a problem of categories getting disappeared.

1
  • Thank you for the answer, but I want to do that in my custom plugin. Moreover Restrict Categories is not compatible with latest Wordpress updates!
    – Mark
    Commented Apr 29, 2015 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.