Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Can Dashboard Menu Options be Removed?

         

DXL

9:20 pm on Nov 9, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When logged into the admin area, there are menu options to the left for Posts, Pages, Media, Appearances, etc. I noticed that when a client request a template installed (with a cherry framework), new options become set in that that side menu (testimonials, clients, etc).

However, even if I delete all posts pertaining to that category (if they don't need a page or posts related to "clients"), the option is still there in the menu. I want to remove unnecessary options. Is there a way to manually remove it while in the admin area, or a particular php on the server that I can simply delete snippet of code from to remove it from the admin dashboard?

Lemosys

10:15 am on Nov 18, 2015 (gmt 0)

10+ Year Member



Yes,We can remove menu option from WordPress dashboard .

Here’s what you’re looking for:

<?php remove_menu_page( $menu_slug ) ?>

Replace the menu slug with the name of the php script for the menu item you want to remove.

Here’s a quick example. Let’s say you want to remove the posts menu. Who needs to write posts?

<?php
/*
Plugin Name: Remove Settings and Posts Menu
Description: Just don't want my settings menu anymore and I don't want to write any posts - what's the big deal?
Version: 0.1
License: GPL
Author: Example Author
Author URI: example.com
*/

add_action( 'admin_menu', 'my_remove_menu_pages' );

function my_remove_menu_pages() {
remove_menu_page('options-general.php');
remove_menu_page('edit.php');
}
?>

[edited by: travelin_cat at 2:46 pm (utc) on Nov 18, 2015]
[edit reason] Exemplified author & URI [/edit]

DXL

1:35 am on Nov 19, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So what exact php page (which filename) do you have to add that coding to in order to remove the menu choice?

tangor

2:39 am on Nov 19, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This does not work for you? [en.support.wordpress.com...]

DXL

9:26 pm on Nov 20, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That is a tutorial on how to edit the menu that appears on an actual site or blog. I'm specifically asking about the dashboard menu options that appear on the left when you log into the wp-admin area of a site/blog.