Change WordPress user roles and capabilities › Forums › Give user access to plugin – how to › Role to edit a page only without losing admin menu
Tagged: page edit
- This topic has 10 replies, 2 voices, and was last updated 6 years, 5 months ago by Vladimir.
11/12/2016 at 17:50 #3047
Hello, i have a role for users (PR Department) and i want to allow them to edit a page on the site. when i do it from (post edit) or (edit access). the user cant use the admin menu. and when i go to the user himself under (Posts/Pages/Custom Post Types Editor Restrictions) i see it sellect (allow) for the page ID . but its ignoring (Look at roles).
so when i select ( Look at roles) the admin menu works fine again.
help please ?12/12/2016 at 01:04 #3049
Give me more details, what is wrong with admin menu? Screenshots are very appreciated. I may look on your settings on-line if you send admin credentials to support [at-sign] role-editor.com
‘Allow’ is a default action at the user level. It works together with restriction set for this user at the role level, but if you selected the same action ‘Allow’ for role. Plugin should use both restrictions data (from the user level and the role level) simultaneously. When you select ‘look at roles’, plugin ignores restrictions selected at a user level.
When you select different actions at user and role levels, user level has a priority.12/12/2016 at 13:06 #3053
hello, this is the full story :
12/12/2016 at 13:36 #3055
Thanks for the clarification.
Edit restriction is applied by default for all post types. As you allowed to edit just 1 page, user can not edit posts. But it’s possible to exclude selected post type from the global restriction. Use this filter ure_restrict_edit_post_type.13/12/2016 at 08:06 #3067
Hello, i have added (ure_restrict_edit_post_type) to the (PR role) and nothing changed. and tried it on the user himself.
Same as the pictures above.13/12/2016 at 08:52 #3069
What did you really do?
You should use the sample code from this link and insert it into the active theme’s functions.php file. Did you?13/12/2016 at 09:33 #3070
Hello, i didnt at the first time .
i did added the code in the child theme active functions.php.
and tried it again, this time the admin panel workking fine, but it still cant edit the (page ID1265).
when i try and edit it by link :
i got this error
“Sorry, you are not allowed to edit this item.”
and thanks for the extream fast reply 😀13/12/2016 at 09:40 #3071
Is this user the author of the page id 1265? ‘edit_others_pages’ capability is required in other case.13/12/2016 at 09:56 #3072
no hes not the author . i just added “edit_others_pages” to him . still he cant access .13/12/2016 at 10:09 #3073
i did added “Edit published pages” its work now . Thanks 😀13/12/2016 at 10:28 #3074
Right. User should have the basic permissions. ‘edit restrictions’ just narrow them according to your input.
- You must be logged in to reply to this topic.