Support » Fixing WordPress » Disable menu items

  • Hi,

    A WP user recently asked me if there was a way to disable menu items rather than deleting them.

    The menu is fairly substancial and I created the structure for it. They wanted to keep the structure but not have the empty pages show in the menu. So they asked if it was possible to simply disable them?

    Does anybody know of a way of doing this?


Viewing 7 replies - 1 through 7 (of 7 total)
  • You mean on the front end of the site?

    You can customize them via Appearances -> Menu as you want.

    I’m looking for the same thing & have the same problem as the1path – “The menu is fairly substancial and I created the structure for it”

    Thanks for the reply Ipstenu.. but for customising menus, right now if you do not want an item to appear in the menu, you only have the option to delete it. However, I would rather be able to “disable” so that the user can easily “enable” it if they want it to appear.

    Is there a plugin for this?

    No, there’s no plugin for that. But …

    In the appearance menu, click on ‘Screen Options’ and under Show advanced menu properties check the box for ‘CSS’

    Then when you add items, you can see ‘CSS Classes (optional)’ – Make a class in your style to display nothing (like .menu-hidden {display:none;}) and call that there.

    @ipstenu, using css you can only hide it visually, but if someone check the html the menu item is still there, as well the anchors with the links. (eg Search Engines and crawlers)

    What is needed is a way not to output the html at all. It’s a feature present in many CMS.

    Heavens. 9 months later.

    If you don’t want to output the HTML, remove the items. I know, you don’t want to, but think of it this way: All the enable/disable does is add an item to the menu. It’s just incorporating the menu in an all in one interface, rather than WP’s drag and drop.

    It’s just user preference. Teach your users how to use the product, rather than trying to shove the product into a small box 🙂 Everyone will be better off in the long run.

    It’s a feature present in many CMS, like joomla. I don’t think is totally useless!

    Imagine you have a complex item with many subitems and submenu, but you want to disable it for a while or while the related pages are not ready yet. With the actual method you have to cancel it totally and then rebuild it from scratch!

    I think is a very simple and no brainer feature! just a “display” checkbox would be enough! (it could be also usefull for plugin developers).

    There is an API to hack the menu builder interface? If yes, then I could build a plugin for it!

    (i also want to add other functionalities to the menus)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Disable menu items’ is closed to new replies.