WordPress.org

Ready to get started?Download WordPress

Forums

Remove menu items (1 post)

  1. dallasb86
    Member
    Posted 1 year ago #

    I am trying to remove menu items from the backend but for some reason I can't remove specific menu items added by plugins. For example, I can use this line to remove the plugins page and it works just fine:

    remove_menu_page('plugins.php');

    I have a plugin, CW Image Optimizer, that adds a sub menu under the Settings menu. The php file the plugin uses is named cw-image-optimizer.php. If I use the following line to remove the sub menu it doesn't work:

    remove_submenu_page('options-general.php', 'cw-image-optimizer.php');

    Is there something specific I need to do to remove menu and sub menu items added by plugins?

Topic Closed

This topic has been closed to new replies.

About this Topic