in WordPress

Remove Links From Wordpress Admin Menu

Since Wordpress 3.1 they have made it very easy to remove any unwanted links from the admin menu bar. Wordpress link menu Most people don't want the Links menu item to be displayed so by adding the following code to your functions.php page you can remove the links menu item.

add_action( 'admin_menu', 'my_admin_menu' );

function my_admin_menu() {

If you want to remove any of the others then make sure that you change link-manager.php page to one of the other pages. For example if you want to remove the media link from the menu then change the above snippet to.

add_action( 'admin_menu', 'my_admin_menu' );

function my_admin_menu() {

Remove Sub Menu Pages

To remove a sub-menu page you can not use the remove_menu_page() function, this will not work. If you want to remove a sub-menu page you need to use the function remove_submenu_page(). You use this the same way as the remove_menu_page() but you pass through the slug of the sub-menu.

<?php remove_submenu_page( $menu_slug, $submenu_slug ) ?>

Upgrade to access all content on Paulund

Members unlock all tutorials and snippets

Access to all downloadable content

Access to code examples before others

Sign Up Now

Already a member? Login here

Subscribe To The Weekly Newsletter

Get weekly updates to your email