• I am working on a theme where I want to have the logo in the top middle and the navigation links split on each side of the logo on the same plane. I have tried playing with the css using simple custom css to see if I can move them from one side to the other to no avail. Is it possible to have a single navbar split to make two or to make two navbars?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Depending on the menu layout, there might still be a CSS solution using nth child selectors, assuming the number of menu items would only change infrequently. The logo could be a background for the menu container, but the menu item fill typically would block it. If there were 6 menu items, the 3rd item could have a large right margin which would expose the underlying logo.

    Some custom PHP code may be easier. The “wp_nav_menu” filter could be used to split the menu container into two, inserting logo HTML between them. It may help to add a placeholder menu item which would indicate where the filter code would split the containers and insert the logo.

    Some general information on filters if it helps.

    Having two nav menu locations in the header is also a possibility. The best approach might be decided by the sort of user experience you prefer.

Viewing 1 replies (of 1 total)
  • The topic ‘Navigation Bar question’ is closed to new replies.