Site logo

Archived topic

How to add a link anchor directed to halfway down Home page

3 replies · Started by Larry on May 26, 2022

Viewing posts 1–4 of 4

I'm just trying to add a new item to the Home Page menu that links to a section halfway down the Home page. In other words, a quick scroll down the Home page to that section, which was created using the WP Show Posts plugin.

Forgive my inexperience, but a search for "HTML anchor" and the section on additional CSS made no sense to me as an amateur. I'm wondering if what I want to do (link a menu item to a specific section part-way down the Home page) is simpler than it seems.

Hi there,

1. Edit your page and select a Block where you want the link to jump to.
1.1 With that block selected go to the Advanced tab, in the HTML Anchor field add your anchor name eg. halfway-down

2. In Appearance > Menus add a Custom Link, give it a label and in the URL field add: #halfway-down
2.1 Note the URL is the HTML Anchor proceeded by a #

So now this assumes that all pages have a halfway-down anchor on them. Or the menu item won't work.

If you want the menu item to always jump to a specific page and halfway down then the URL of your menu item would be:

https://yourdomain.com/your-page/#halfway-down

and for the home page it would be:

https://yourdomain.com/#halfway-down

Does that help ?

Thanks for such a quick and clear response, David. Your solution was easy to follow (even for me) and works perfectly!

So glad to hear that!

This archived topic is closed to new replies.