How to Create Anchor Links in WordPress

Anchor Links or Jumping Links are a great way help your website visitors navigate the content on your web page. They are especially useful when a page or a post is quite long. Here’s the headlines:

What Are Anchor Links?

Easy – just take a look above. Anchor Links are an alternative way of using hyperlinks, except they don’t link to other pages in your site. They link to the content in your page. When a visitor clicks on an anchor link they are taken to or ‘jump’ to that place on the page.

Benefits of Anchor Links

Using Anchor Links helps your visitors to find the content on your page that they are looking for. By creating what in effect is a table of contents, visitors can go straight to a particular section on your page. They also help with SEO as Google may pick up your Anchor Links and add then to your listing in Google Search just under the listing description.

How to Create Anchor Links in WordPress

You could grab a plugin, but to be honest it’s just as easy to add Anchor Links in WordPress without a plugin. Here’s how you do it. Step 1 – Write your table of contents. For example, in this post we’ve used 3 sections, so our table of contents become:
  • What Are Anchor Links?
  • Benefits of Anchor Links
  • How to Create Anchor Links in WordPress
Step 2 – Write your content. You’ll probably want to use H2 or H3 headings to create your section headings (as we have in this post for example). Step 3 – Create your links. You do this the way you normally add links. Highlight the text and click the link icon. Now, this is where it’s a little different. Instead of adding a full URL or selecting a page, this is where we add the Anchor Link. This is done by using a # and a word or a link. So, for example in our post here, our Anchor Link to this section uses the work ‘create’. So, our anchor link looks like: #create If you use more than one word, you’ll need to use hyphens. For example: #how-to-create-anchor-links Step 4 – Create the link to your content. To do this we need to switch to the Text tab in the editor. Here you’re looking for your section headings. If you used Heading 2 to create your headings, they you should see these written as

Your Heading

. We need to make an addition to this to tell the anchor link where to jump to and we do this by adding an id into the heading tag. We need to add id=”your-link” into the first part of the tag. Using our example above, we used #create for this section. Our Section title is How to Create Anchor Links in WordPress so currently we have:

How to Create Anchor Links in WordPress

  We need to change this to:

How to Create Anchor Links in WordPress

  Do this for each of your links and save your page or post. You should now be able to click onto your links and jump to the section you want. We hope you found this useful.