{"id":2829,"date":"2014-08-01T14:07:38","date_gmt":"2014-08-01T14:07:38","guid":{"rendered":"http:\/\/www.deuzebranaweb.com.br\/?p=2829"},"modified":"2014-08-01T14:07:38","modified_gmt":"2014-08-01T14:07:38","slug":"remove-menus-and-submenus-from-the-wordpress-dashboard","status":"publish","type":"post","link":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/2014\/08\/01\/remove-menus-and-submenus-from-the-wordpress-dashboard\/","title":{"rendered":"Remove menus and submenus from the WordPress Dashboard"},"content":{"rendered":"<p>Sometimes you might need to remove posts, pages, plugins or other menus and submenus from the WordPress dashboard.<\/p>\n<p>Here\u2019s two handy functions put together to remove all by Chris_O over at StackExchange.<\/p>\n<p>Simply add these to the functions.php file in your WordPress theme then delete or comment out whichever options you don\u2019t wish to use.<\/p>\n<p>view plaincopy to clipboardprint?<br \/>\nadd_action( &#8216;admin_menu&#8217;, &#8216;remove_admin_menus&#8217; );<br \/>\nadd_action( &#8216;admin_menu&#8217;, &#8216;remove_admin_submenus&#8217; );  <\/p>\n<p>\/\/Remove top level admin menus<br \/>\nfunction remove_admin_menus() {<br \/>\n    remove_menu_page( &#8216;edit-comments.php&#8217; );<br \/>\n    remove_menu_page( &#8216;link-manager.php&#8217; );<br \/>\n    remove_menu_page( &#8216;tools.php&#8217; );<br \/>\n    remove_menu_page( &#8216;plugins.php&#8217; );<br \/>\n    remove_menu_page( &#8216;users.php&#8217; );<br \/>\n    remove_menu_page( &#8216;options-general.php&#8217; );<br \/>\n    remove_menu_page( &#8216;upload.php&#8217; );<br \/>\n    remove_menu_page( &#8216;edit.php&#8217; );<br \/>\n    remove_menu_page( &#8216;edit.php?post_type=page&#8217; );<br \/>\n    remove_menu_page( &#8216;themes.php&#8217; );<br \/>\n}  <\/p>\n<p>\/\/Remove sub level admin menus<br \/>\nfunction remove_admin_submenus() {<br \/>\n    remove_submenu_page( &#8216;themes.php&#8217;, &#8216;theme-editor.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;themes.php&#8217;, &#8216;themes.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;edit.php&#8217;, &#8216;edit-tags.php?taxonomy=post_tag&#8217; );<br \/>\n    remove_submenu_page( &#8216;edit.php&#8217;, &#8216;edit-tags.php?taxonomy=category&#8217; );<br \/>\n    remove_submenu_page( &#8216;edit.php&#8217;, &#8216;post-new.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;themes.php&#8217;, &#8216;nav-menus.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;themes.php&#8217;, &#8216;widgets.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;themes.php&#8217;, &#8216;theme-editor.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;plugins.php&#8217;, &#8216;plugin-editor.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;plugins.php&#8217;, &#8216;plugin-install.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;users.php&#8217;, &#8216;users.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;users.php&#8217;, &#8216;user-new.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;upload.php&#8217;, &#8216;media-new.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;options-general.php&#8217;, &#8216;options-writing.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;options-general.php&#8217;, &#8216;options-discussion.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;options-general.php&#8217;, &#8216;options-reading.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;options-general.php&#8217;, &#8216;options-discussion.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;options-general.php&#8217;, &#8216;options-media.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;options-general.php&#8217;, &#8216;options-privacy.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;options-general.php&#8217;, &#8216;options-permalinks.php&#8217; );<br \/>\n    remove_submenu_page( &#8216;index.php&#8217;, &#8216;update-core.php&#8217; );<br \/>\n}  <\/p>\n<p>http:\/\/www.ajom.co.uk\/2013\/09\/remove-menus-and-submenus-from-the-wordpress-dashboard\/#.U9rEqPldXFD<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you might need to remove posts, pages, plugins or other menus and submenus from the WordPress dashboard. Here\u2019s two handy functions put together to remove all by Chris_O over at StackExchange. Simply add these to the functions.php file in your WordPress theme then delete&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_angie_page":false,"page_builder":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-2829","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2829","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=2829"}],"version-history":[{"count":0,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2829\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=2829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=2829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.deuzebranaweb.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=2829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}