Change WordPress user roles and capabilities › Forums › Give user access to plugin – how to › How to allow user role tag custom taxonomy in cpt
Tagged: CPT, custom taxonomy
- This topic has 6 replies, 2 voices, and was last updated 5 years ago by
Vladimir.
-
AuthorPosts
-
10/02/2021 at 15:27 #7350
Peled Ben Yair
ParticipantHi. I have a custom post type with two custom taxonomies,
_kb-cats
audienceI 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.11/02/2021 at 04:14 #7353Vladimir
KeymasterHi,
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. 11/02/2021 at 08:02 #7354Peled Ben Yair
ParticipantHi 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)11/02/2021 at 08:06 #7357Vladimir
KeymasterYour 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’?
11/02/2021 at 09:17 #7358Peled Ben Yair
ParticipantThanks 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 thepostspost type
just the cpt
is it possible?11/02/2021 at 09:35 #7359Peled Ben Yair
Participant11/02/2021 at 10:03 #7360Vladimir
KeymasterTry 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. -
AuthorPosts
- You must be logged in to reply to this topic.


