Static Menu Tabs: Leaving the URL field blank in custom links?

  • Author
  • #716231

    Hello all :)

    As per the custom menus support document, I added a static top level tab to my menu, and it worked fine. As an experiment though, instead of using # as the URL in the custom link, I left it blank. As you can see on my blog under the ‘Newtownforbes’ menu item, it seems to work just as well as when using #, but with the added benefit of not showing up the http://blah/# URL in the status bar when you hover over it. (The cursor also changes from a finger pointer to a plain I-bar.) Basically the menu item becomes a plain non-clickable text field, which to my eyes is nicer than the # version. So my question is, is this behaviour supported and valid – i.e. can it be relied upon to work in future versions of WordPress – or is it a fabled ‘undocumented feature’? :)

    The blog I need help with is


    I was the first to suggest this (when custom menus were still a novelty and worked in a few themes only):

    And I kept suggesting it since then. If I remember well, there was a thread where a staff member said you can also use the # method, which means they didn’t object to the other way of doing it. But they may change their mind.

    Can it be relied upon to work in future versions of WP? I don’t think this question can be answered: WP updates things all the time, so you cannot know. The Support docs are also continually updated, but still they don’t document everything. The # trick itself wasn’t there from the start:


    Thanks for the response. I didn’t think the idea could have been original, but I couldn’t find any previous mentions in the forum. Thanks for the pointer. :)

    As a newbie, I’m surprised that this isn’t documented in the menus support doc instead of the # method. Leaving a blank url just seems much ‘cleaner’. As well as not having the dummy URL show up in the status bar, and the visual clue of the pointer changing to an I-bar, (as mentioned above), there are a few other minor advantages. For instance, clicking a # adds it to your browser history; jumps to the top of the page if you’re scrolled down, moving the menus away from your mouse pointer; and highlights the # item clicked, even if you’re still actually looking at a page that’s not part of that menu. None of these, albeit minor issues, occur with a blank url.

    I hope you get the staff to take notice sometime! :)

The topic ‘Static Menu Tabs: Leaving the URL field blank in custom links?’ is closed to new replies.