How to Link to Page Content from a WordPress Navigation Menu
Sometimes you want your navigation menu items to link to something on the middle of the page. This is especially true for one-page websites or long scrolling homepages.
Fortunately, linking to “anchors” in the middle of the page content is easy in WordPress. This quick video shows you how.
Here’s a quick text summary of the video:
How to Make Nav Menu Links to On-Page Content
- Give the item you want to link to an
<h2 id="target-element">Section Title</h2>.
- In the Menu area in either
wp-adminor the Customizer, create a new Custom Link.
- Set the Custom Link to point to the page on which the content lives, plus the
#character, plus the value of the element’s
- Save your changes to the menu and test the link to make sure it works.
And that’s it! Creating on-page links can be a very useful thing to know how to do in WordPress, so give it a try.
Add a comment