Step by step guide for adding anchor links to move from one place to another in WordPress

If you click on the links in this post, we may earn money from the companies mentioned in this post, at no extra cost to you. You can read the full disclaimer here.

Sharing is caring!

Sometimes, when working on a page on your website or writing a blog entry, it can be helpful to link to another website or another page on your website.

Sometimes, though, you might want to link to something further down on the page or post itself.

You can do this with what’s known as anchor links or page jumps.

If you have WordPress, there are a couple different ways you can do it.

The Gutenberg editor makes it fairly straightforward, since you can link text (called anchor text) to a particular block. We have a video tutorial that shows you how.

You’ll need to use HTML if you’re using the classic WordPress editor – but don’t worry! We’ll walk you through it.

How to Make Anchor Links with the Block Editor

In this short WordPress video tutorial, you’ll see how easy it is to make anchor links by using the following steps:

  1. Find the block you want to link to.
  2. On the right hand side (under the Block heading) click on Advanced to expand that section.
  3. Where it says HTML Anchor, name your bookmark. (We did “bookmark” – you can choose a different word.)
  4. Highlight your anchor text and click on the link icon. (We did the word “first” – you can do any word or words.)
  5. Type in # and then your bookmark name, then click Apply. (For our example, it was “#bookmark”.)

How to Make Anchor Links with the Classic Editor

Although it takes a little more work, you can definitely add anchor links or page jumps with the classic editor in WordPress. We’ll go through the process right now!

We’ll do this in 2 steps:

  1. Make what we’re going to link to
  2. Make the link

We’ll say that the “bookmark” is what we’re going to link to.  (It’s also thought of as the target, the anchor, etc).

Now, keep in mind that our bookmark can be any place in our blog entry (like in between 2 paragraphs) OR it can be specific words in the blog entry.

So, let’s get to it!

1. Creating a Bookmark in WordPress

First, we’re going to make the bookmark.

We can do this with the following code:

For a general bookmark

<a name=”bookmark-name”></a>

Specific words (anchor text) as the bookmark

<a name=”bookmark-name”>My Words</a>

The “bookmark-name” is any word (or hyphenated words) that makes sense for your blog entry.  Make sure you choose a different word (or hyphenated words) for each bookmark you add.

You can add this code by switching from the Visual to the Text editor by clicking on the Text tab.

visual and text tabs in the classic editor in wordpress

2. Creating an Anchor Link in WordPress Classic Editor

Now, we can link to the bookmark.

We can do this with the following code:

<a href=”#bookmark-name”>Your Link Text</a>

Again, you’ll want to add this code in the Text Editor.

Conclusion

You can easily add anchor links using the block editor in Gutenberg. This involves linking anchor text to another block on the page or post.

You can do the same thing with the classic editor in WordPress, but you’ll need to use the Text editor and add a little bit of html code.

Either way, you can follow the instructions and/or watch the step-by-step video so that you can add anchor links to your posts and pages in WordPress.