• Hi

    I am attempting to redirect an old page to a certain point on the home page. How do I use anchor tags in WordPress?

    Many thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you give the element on the home page you want to link to a specific ID, you can link to it with an anchor.

    For example, if you had a headline (h1) on your home page called welcome, you would do this:

    <h1 id="welcome">Welcome</h1>

    You just add the id=”welcome” to that tag. It doesn’t have to be an h1 tag, it can be really any type of element on the page.

    Then you’d just link it directly to that URL:

    <a href="https://www.yoursitedomain.com/#welcome">Click Here</a>

    @northfool71 If you’re just looking to set up a straight forward anchor link, you can either select the Insert/edit link button when in visual mode to link any select text or perhaps in image and add the ID of the element you you wish to jump to. Or if you’re in text mode the following will work a treat.

    <a href="https://DirectedUrl.com#element" title="Custom title text">Button Text</a>

    Hope this helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Anchor tags’ is closed to new replies.