Home » WordPress Tutorials » How to Add Anchor Links in WordPress

How to Add Anchor Links in WordPress (Jump Links)

Photo of author
By Martie
Last Updated:
Photo of author
By Martie
Last Updated:
Photo of author
Updated:

In this post, we’re going to be covering how to add anchor links in WordPress.

(these are sometimes referred to as “jump links”)

Anchor links on WordPress, are basically the same as standard text links.

But, instead of linking to another page or website.

They link to a specific part of the same page (or post).


We can use anchor links for:

  1. Adding a clickable “table of contents” to the top of our blog posts.
  2. When referring someone to a specific part of a page or post.
  3. Skipping over certain parts of a tutorial, that don’t apply to everyone.
  4. Linking to specific answers of an FAQ page.

(these are just a few examples, I'm sure there are more)

WordPress Anchor Links

How to Add Anchor Links in WordPress


So, to create an anchor link on WordPress.

We first need to open up the post editor, for the page or post we’re wanting to add the anchor link to.

The WordPress Page Editor.

Then, to create the anchor part of our link.

We need to find the first content block that we want our reader to see, after they click on the anchor link.

I'm using a text heading in my example, but this will work with any content block we have on our page (text, images, forms, etc).

Then, we’re going to click on the block, to select it.

A text heading (selected) in the WordPress page editor.

Then, once it's selected.

We need to click into the Advanced options, on the right side of the editor.

Advanced WordPress Page Options > HTML Anchor

If you don’t see the Advanced options on the right.

Make sure “Block” is selected, in the top right of the editor:

WordPress Page Editor Content Block Options.

Now, we’re going to type our anchor text (without any spaces), into the box labelled: HTML ANCHOR.

WordPress HTML ANCHOR Link Text.

We can use whatever text we like for our HTML Anchor.

(including hyphens, numbers, and capital letters).

Worth Noting: There is no minimum or maximum length for our HTML anchor.


Creating the Anchor Link


Then, once we’ve created the anchor for our link.

We can add the actual link.

To do this, we need to find the text we’re wanting to use for our anchor link.

(or, type some).

Anchor Link Text in WordPress Page Editor

Then, we’re going to highlight the text with our mouse.

And click the chain link icon, in the menu above it.

Highlighting Anchor Link Text in WordPress + Chain Link Icon.

This will open a pop up box, for us to add the link:

WordPress URL Field (Pop Up Box)

Now, in the URL field, we’re going to type a # symbol.

Followed by the HTML Anchor we used a moment ago.

In my example, I used WebsiteDesign as my HTML Anchor, so I need to type #WebsiteDesign into the URL field.

(be sure to include any capital letters or hyphens, if you used them).

WordPress Anchor Link Text Entered into the URL Field.

Then, we need to click the Enter icon to the right, to add the link.

(when we do this, the text should change color in the editor).

Anchor Link Created in WordPress Page Editor.

Finally, we just need to Update the page, to save our changes.

WordPress Update Page (Button)

And now, when we visit the page, and click on the anchor link, it’s going to bring us straight to the section we linked to. 😎


Using These Links Elsewhere


Then, if we want to send the anchor link to someone in an email, or use it in a different page or post.

We just need to add the HTML Anchor to the end of the page’s URL.


For example, if I added an anchor link to a page on the following URL:

And used the HTML Anchor:

The anchor link would be:

https://martieswebsite.com/services/#WebsiteDesign

We need to add the # symbol before the Anchor, or it will not work.


Now, we can send this anchor link to friends in an email, or use it in another page or post on our WordPress website.

So, that’s us now at the end, and that was how to add anchor links in WordPress.

I really hope you found this post helpful.

If you did, please consider subscribing to my email newsletter, and I’ll send you a quick email the next time I release a new WordPress tutorial.


Until next time,
Martie.

P.S.

Here are a few more posts of mine to check out:

5 1 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Join the Newsletter?

Just enter your details on the right and I'll send you a quick email when I publish something new.

Join the Newsletter?

Just enter your details into the form below, and I'll send you a quick email when I publish something new.

Join the Newsletter?

Just enter your details below, and I'll send you a quick email when I publish something new. (no spam)