Remove unwanted WordPress menu items

When creating WordPress websites for clients I like to remove features that will not be used to prevent confusion and questions. For example, allot of WordPress website I create do not contain a blog and therefore have no ‘Posts’ menu item.

Removing a menu item is easy, if you for example would like to remove the ‘Posts’ menu item you simply add the following code to your project (for example to your theme’s functions.php).

add_action('admin_menu', 'remove_options');

function remove_options() {
	remove_menu_page( 'edit.php' );

You can delete any admin menu item this way, all you need to do is add the php file as argument to the ‘remove_menu_page’ function. So if you delete the ‘Posts’ menu item like I did in the example above you most likely also want to delete the menu item ‘Comments’. Following code will remove both.

add_action('admin_menu', 'remove_options');

function remove_options() {
	remove_menu_page( 'edit.php' );
	remove_menu_page( 'edit-comments.php' );

Please note that the ‘remove_menu_page’ function does not disable or restrict access to the removed page, it only removes the menu item. In many cases this will do, but always keep security in mind.

Related Posts

Powered By Related Posts for WordPress
Click Here to Learn More About Related Posts for WordPress

3 thoughts on “Remove unwanted WordPress menu items

  1. Sir How to delete newsletter Tab created in Menu Bar ?

  2. How to remove Archives, Author,Tags and others unwanted URLS?

  3. HannahTreasure14k
    Purchasing a used or new car can be quite a tough method if you do not know what you really are doing. By educating yourself about car shopping before you decide to go to the dealership, you can make points easier yourself. The following advice may help your following buying getaway be pleasant.

    Always deliver a auto mechanic coupled when looking for a new car. Vehicle retailers are popular for offering lemons and you may not desire to be their up coming sufferer. When you can not have a technician to think about autos with you, at the very least make sure that you have him review your final selection prior to buying it.

    Know your boundaries. Before you start purchasing for your forthcoming auto or pickup truck, make a decision what you can afford to shell out, and adhere to it. Don’t overlook to include curiosity about your calculations. You will definitely spend about 20 % as an advance payment as well, so be well prepared.

    Prior to seeing a car dealership, know what type of vehicle you want. Investigation each one of you alternatives prior to buying in order to figure out what works the best for your financial budget and family demands. Seek information to find out simply how much you need to be paying for any potential automobile.

    Prior to signing any agreement take the time to read through every single range, including the fine print. If you have something shown you do not understand, will not sign up until you have an solution that you just comprehend. Unsavory salesmen can use a binding agreement to insert many fees that have been not mentioned.

    Should you maintain the preceding guidance under consideration next time that you simply go buying a car, you will certainly be very likely to get a better bargain. Investing in a car does not have to become a headaches. Just use the guidelines with this article and you will obtain the auto you desire at a good selling price.

Leave a Reply

Your email address will not be published. Required fields are marked *