-
AuthorPosts
-
January 7, 2015 at 4:09 pm #376220
After my earlier question “How to enable the Enfold “Theme Options” for editors?” the solution was to add the “manage_options” capability to the Editor role by means of the “Members” role editor plugin.
However, this “manage_options” capability also enables the “Settings” menu, which should not be available to Editors. I tried setting other capabilities, but none of the capabilities I can select in the “Members” role editor plugin works as required.
Other themes seem to work a bit more consistent. For instance, when I use the Nevada theme, adding the “edit_theme_options” capability to the Editor role enables access to the theme settings, without enabling the Settings menu. As discussed in my previous question, setting edit_theme_options does not work for Enfold.
For now, I’m not looking for a solution based on CSS to simply not display the Settings menu, and I understand this is currently not how Enfold works, but still I’d like to find a good solution, such as a custom capability, to enable the Enfold Theme Settings without revealing the Settings menu.
Can you help me to realize a solution?
- This topic was modified 9 years, 10 months ago by ocetechnologies.
January 7, 2015 at 10:30 pm #376501Hey ocetechnologies!
This is starting to border on custom work so it would be best to hire a freelancer to help you out with these editor customizations.
The CSS you need is this.
#menu-settings { display: none !important; }
And you can try using this function, http://codex.wordpress.org/Function_Reference/current_user_can, to check if the user has certain capabilities.
Regards,
ElliottJanuary 8, 2015 at 9:56 am #376681Hi
Okay, I can hire a freelancer, but before I do that I need to know if there is a “hidden” setting, or “hook” or capability in Enfold that enables the Theme Options menu. Is there? Or is it only controlled by the “manage_options” capability?
Ideally, to enable the Enfold Theme Options menu for certain user roles should be controlled by the “edit_theme_options” capability (which seems to be designed exactly for this purpose) , and NOT by the “manage_options” capability. Should this be an improvement / enhancement request?
Your advise please
January 8, 2015 at 9:49 pm #377101Hi!
It sounds like your looking for line 143 in /enfold/framework/php/class-adminpages.php.
Best regards,
ElliottJanuary 9, 2015 at 10:19 am #377287Ok, this seems to work, after changing “manage_options” into “edit_theme_options” in line 143 (and 155) in that file, and after adding the “edit_theme_options” capability to the editor role, the Enfold dashboard menu appears for Editors and can be used.
Last question then: I assume this change is overwritten during a theme upgrade (or may be overwritten). How can I preserve this change? I’m already using a child theme.
- This reply was modified 9 years, 10 months ago by ocetechnologies.
January 10, 2015 at 6:57 pm #377826Hey!
You can copy the whole
avia_adminpages
class to your child functions.php.Regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.