• Hello,

    So I am working on a responsive site where the parent pages need to be the same as the first child page.
    Sample:
    About

    • Overview
    • Careers
    • Team

    On small screens the navigation expands. To get to About/Overview, a click (touch) on About and then on Overview is required.
    On larger, desktop size screens, the sub-navigation does not expand. To reach the same page, a single click on About is required.

    – Just FYI: The sub-navigation on desktop screens is displayed further below in the content.

    Now my questions:

    1. How to manipulate the wp_nav_menu() to link ‘About’ to ‘Overview’?
      Default is https://www.mypage.com/about and child page https://www.mypage.com/about/overview/, but both links should point to https://www.mypage.com/about/overview/. I don’t want to add custom links to the menu.
    2. If above doesn’t work, how do I display, the contents of the first child page in the parent page?

    I am using the roots starter theme in case that’s important.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • As an alternative, don’t create a child Page. Instead, in the menu, make the top level item a Custom Link pointing to the page, and the first sublevel the Page itself.

    Your menu would look like this:

    About – a custom link to the Overview Page.

    • Overview – the Page itself
    • Careers
    • Team

    Here is a video tutorial on the Menu system that might help: https://ericasays.com/2984/wordpress-3-custom-menu-tutorial/

    Thread Starter Snaggletooth

    (@snaggletooth)

    Thanks vtxyzzy,
    That’s what I ended up doing. Actually I thought about it myself, but didn’t think it was the best idea because of the dependency on the permalink structure. Well, did it anyway…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Making parent and first child page the same (url and content)’ is closed to new replies.