Support » Themes and Templates » Formatting Navigation Menu in _s Theme

  • Hello,

    I am trying to achieve the following:

    I’d like to use the build-in custom menu function of the current WordPress version to generate a menu that looks exactly like this here in my HTML-layout:

    I’d like the main pages to display in the upper row of navigation elements and the sub-menu (which is also generated by grouping these items as a sub-menu in WordPress) in the lower row, changing when the main page changes.

    I have tried a couple of ideas from the web but not to a satisfying result yet. The problem seems to be that the sub-menu is a nested <ul> inside the main navigation <ul>. I didn’t manage to seperate them yet.

    The best I have achieved is this:

    It doesn’t render correctly in iOS (the sub-menu level) and the navigation elements don’t align on the left margin , causing problems when I have sub-menu under “KONTAKT for example…

    An additional plus would be to have the first level menu item highlighted when an article is displayed on a single article page. For example: highlight “GRAFIKDESIGN” when displaying an article from Grafikdesign > Editorial Design. But I have already found an ok, not too elegant hack for that.

    Any help is appreciated!

    Thank you, Arne / Berlin, Germany

Viewing 1 replies (of 1 total)
  • seems to me, you could generate a custom menu of the sub-item menu links and then use that on a second line by totally dropping the main menu items out of that menu.

    if you want a different menu for different pages, then you could use if conditions to display them differently depending on the page being viewed.
    you can use if conditions based on the name of the page being displayed e.g. About, using the is_page() tag.


Viewing 1 replies (of 1 total)
  • The topic ‘Formatting Navigation Menu in _s Theme’ is closed to new replies.