Support » Plugins » Hacks » How can you create anchor links in menu drop down?

  • Hiya all

    I’m trying to change menu links into anchor links. I have a page called ‘Menu’ that I would like to have a drop down list with links that jump to certain parts of the page i.e ‘Burgers’. Then users can jump from another page directly to the linked area of the ‘Menu’ page.
    I’ve read a few different topics discussing how to do this, but seem unable to get it to work for me.
    Can anybody please give me any advice how I can achieve this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Andrew Nevins


    Forum moderator

    It’s not clear why you reposted this in the Hacks forum, or at all.

    Five easy steps to get what you want

    1. Get this plugin.

    2. Create a new custom menu in Appearance>Menus. Let’s call it Menu Menu.

    3. Create your menu items by using the “Links” menu object type.

    In the config box for the first Link Menu Item, you would use something like this assuming you have a top level page named Menu:

    Link Text: Section One

    The next one would be:

    Link Text: Section Two

    4. Then in your “Menu” page use the wordpress custom menu shortcode to insert the menu into the page like this:

    [custommenu menu="Menu Menu"]

    Now you should see the Section One and Section Two menu items within the “Menu” page content. You will probably need to adjust your css to get them to display how you want(as a dropdown) but the links should be there.

    5. Then all you have to do is add id="section_one" and id="section_two" to the elements where you want to jump to

    Another way would be to use a form select element with a click handler script that would redirect to the page anchor.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How can you create anchor links in menu drop down?’ is closed to new replies.