0

My theme is not a one-page theme. Nevertheless I would like to have on one page of my site a one-page navigation.

For example: In primary menu I have "About us", "Responsibility", "Our offer"… "Responsibility" and "Our Offer" has some sub-navigations points in the drop-down menu. And they are linking to singe pages.

But "About us" should be a one-pager. All the sub-menu points in the drop-down, opening when "About us" is clicked, should not link to different pages, but to the same page but to different sections within this page.

How do I set up this?

Can I build a menu as I would normally do it in the backend. So I drag-and-drop a menu with "About us" and so on. I drag-and-drop some submenu points to "About us" like "History", "Career" and so on. Then I put my content on the "About us" page and add some IDs to my headings like as an anchor. Then I go to the .php-file in which my just build menu is and link not to different pages but to the corresponding IDs.

Thank you

0

You can do exactly what you suggest. You do not need to create a separate menu or change the php of a page template.

If you add IDs like you suggested as anchors, then your menu items can just specifically target those IDs via the # sign.

To control the link to this degree, you will need to add "Custom links" instead of just selecting the page from the list.

Example Page: (domain.com/about-us/)

Item on example page : <h2 id="history">History</h2>

Menu item: Custom link pointed to domain.com/about-us/#history

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.