Change WordPress user roles and capabilities Forums Give user access to plugin – how to How to allow user role tag custom taxonomy in cpt

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #7350
    Peled Ben Yair
    Participant

    Hi. I have a custom post type with two custom taxonomies,
    _kb-cats
    audience

    I allowed the user to create a new post but the taxonomies are disabled.
    what can I do in order to allow the user to tag the post?
    thanks.

    #7353
    Vladimir
    Keymaster

    Hi,

    1st, look for the assign__terms user capability. If you don’t see it and it does not work if you try manually add it, then I can suppose that custom taxonomy is defined with default capability type. Try to add to a role ‘edit_posts’ and/or ‘manage_categories’ capability.

    #7354
    Peled Ben Yair
    Participant

    Hi I added these three capabilities (link to image attached)
    assign_audience_terms
    assign_kb-cats_terms (though the category begins with underscore _kb-cats )
    amd I also added assign_info_terms (by the name of the CPT they belong to)

    I added the capabilities to the Author abilities
    but in the add CPT ui I still see the checkboxes as disabled… (link to image attached)

    2021-02-11_08-35-50

    2021-02-11_08-40-53

    #7357
    Vladimir
    Keymaster

    Your reply have waited moderation due to the 2 link included. Thanks for the notification about this.

    I see that individual capabilities don’t work for your taxonomies. What about to try ‘edit_posts’ and if it will not help, ‘manage_categories’?

    #7358
    Peled Ben Yair
    Participant

    Thanks for the fast replay
    edit posts helped, but I dont want the users to be able to crud posts, comments or many other options that user the posts post type
    just the cpt
    is it possible?

    #7359
    Peled Ben Yair
    Participant

    edit posts add the red marked options to the admin side menu
    2021-02-11_11-34-14

    can I prevent this?

    #7360
    Vladimir
    Keymaster

    Try to block unneeded admin menu items using “Admin menu blocking” add-on.

    Btw., I work on add custom taxonomies to the code executed for the URE’s option
    “Force custom post types to use their own capabilities”. This will replace ‘edit_posts’ for such taxonomies with ‘assign__terms’ capability. So you will not need to add ‘edit_posts’ for custom post types. I plan to add this to the next udpate.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.