Tagged: admin menu, submenu items
-
AuthorPosts
-
June 22, 2015 at 5:23 pm #462947
I’d like to hide “Customize,” “Install Plugins,” and “Editor” under the “Appearance” Menu in the left navigation of the WordPress Admin Panel. I don’t want customers to access the “Editor” function, and unless I’m missing something, “Customize” and “Install Plugins” are available in other places. (If I’m wrong here, please comment.)
I don’t write .php, so I need very specific instructions on what code to add to my Child Theme to get rid of these 3 submenu items. Thanks
June 22, 2015 at 5:34 pm #462953Hey Kim!
Please add following code to Functions.php file in Appearance > Editor
function as_remove_menus () { global $submenu; unset($submenu['themes.php'][6]); } add_action('admin_menu', 'as_remove_menus');
Please add following code to wp-config.php file
define( 'DISALLOW_FILE_EDIT', true );
Best regards,
YigitJune 22, 2015 at 9:19 pm #463059Thanks Yigit,
I tried your code and it works, but you only gave me instructions to remove “Customize.” I figured out how to get rid of “Editor” using the “unset” line above with [101], but I don’t have a corresponding number for “Install Plugins.” How do I get rid of that menu item? Thanks KimJune 22, 2015 at 9:36 pm #463063Hi!
Please add following code to wp-config.php file as well
define('DISALLOW_FILE_MODS',true);
Best regards,
YigitJune 22, 2015 at 9:40 pm #463068Excellent! Worked great! Thank you.
One other question…I want to change the order of the menu items. I don’t know how to reference: Enfold Theme, Portfolio Item, Layer Slider WP. Can you tell me what the .php file names are for each of those or whatever name I’m supposed to use? Thanks Kim
June 22, 2015 at 9:43 pm #463071June 22, 2015 at 9:44 pm #463072Thanks but I don’t want to use a plugin. What are the file names for those Enfold specific menu items? I have the code I need to reorder the menu items. I just need the file names. Thanks Kim
June 23, 2015 at 12:38 am #463104I missed something before. Your line of code: define(‘DISALLOW_FILE_MODS’,true); not only hides “Install Plugins” under the Appearance Menu, it also makes “Installed Plugins” and “Add New” disappear under “Plugins.” I don’t want the submenu items under “Plugins” to disappear, just the one under “Appearance.” There’s no reason to have the “Install Plugins” listed twice.
June 23, 2015 at 7:22 pm #463585Hi!
I do not have “install plugins” under Appearance tab. Maybe you are using a plugin for it modified version of WordPress. So i am not really sure how to remove only that one. To be honest, all these questions are WordPress related and would be better if asked on WordPress forums :)
Cheers!
YigitJune 23, 2015 at 11:32 pm #463709Yigit,
I believe it has something to do with LayerSlider WP that is installed with the Enfold theme. When you click on the Help link within this WordPress Admin page, it opens a developer link to the LayerSlider. This isn’t one of my other plugins.Kim
June 24, 2015 at 2:27 pm #464066 -
AuthorPosts
- You must be logged in to reply to this topic.