0

I have a use case where my WP install is a bunch of pages with sub-pages. For example:

HOME

ABOUT
  - ABOUT US
  - HISTORY
  - PEOPLE
  - AWARDS

PRODUCTS
  - PRODUCTS
  - INGREDIENTS
  - PROCESS

I would like to establish a structure where clicking on the 1st level navigation item ("About") takes you to the first item on the second level ("About us"). The first level navigation item doesn't really exist; it is not a page in itself, it is just a container for the sub-elements.

The purpose of this is to be able to display a second level menu like so (the ^ depicting the selected item):

ABOUT US   HISTORY    PEOPLE    AWARDS
   ^

The only way I can see to do this in Wordpress is setting up a redirect for each first navigation level page. That's awkward in that it would have to be set up for each new page that is created; and it would cause a header redirect, which means another HTTP request, which slows down browsing the page.

Is there an easier approach to this than using a header redirect?

1

You can use the 'About Us' page both in the 1st level menu and in the 2nd level menu. So essentially the same page is in each menu, just rename the one as 1st level menu to 'About'.

The 'About' page should still have a redirect for the Search Engines.

Keep in mind that this way things like the class .current-page-ancestor are not correctly set on the 'About' menu item when on a sibling page like 'People'

  • Ha! That makes a lot of sense. – Pekka 웃 Jul 13 '17 at 8:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.