Custom menu with links within current section

Community Forums Forums General Discussion Custom menu with links within current section

This topic is: resolved

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  oldmankit 1 year ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #72452

    oldmankit
    Member
    Post count: 1

    I have a menu that looks like this:
    Section one
    – page 1.1
    – page 1.2
    – page 1.3
    Section two
    – page 2.1
    – etc
    Section three
    – page 3.1
    – etc.

    This all display through a dropdown menu that uses Superfish script, at the top of the page. When you hover over ‘Section one’, you see an accordian come down with page 1.1, 1.2 and 1.3.

    What I would like to do (even ignoring any accessibility issues) is to be able to have something in the sidebar that duplicates this content without any script, and only has links to pages in the current section. For example, when the user is browsing a page in section one, they would see links to all the pages in section one (1.1, 1.2, 1.3). They wouldn’t see pages from other sections. The same would work when they are browsing pages in section two.

    Obviously I could type the links by hand, but that’s really inflexible. Is there a way I could do this with a plugin or something else?

    I apoligise that my site is in maintenance mode so I cannot provide a working url.

    A related question is this: if people don’t use javascript or are using a screenreader, will they be able to access all of the links in my primary menu?

    #72457

    nutsandbolts
    Keymaster
    Post count: 3187

    There is a plugin called Genesis Simple Menus you might find useful. Basically, you can use Primary Navigation as you normally would, then the plugin allows you to use different Secondary Navigation menus depending on what page, post, category, etc. the person is viewing. So, for example, you could create a menu for Section 1, then assign it to all the posts and pages in that section of the site.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #72656

    oldmankit
    Member
    Post count: 1

    Thanks for the tip on Genesis Simple Menus. I tried it, and decided there should be a more automatic way of adding a custom menu rather than having to select on every page which menu to display.

    I posted my answer on WordPress StackExchange. You can see it here.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.