How To Create Anchor Links In WordPress (3 Methods)

June 19, 2024 by
With every Google update and release seemingly setting the world on fire for a few weeks (“The Internet will never be the same” one proclaims) afterward — we certainly can’t pretend to know what the leading search engine is thinking or planning. One thing we can say with certainty is that, for a long time […]


With every Google update and release seemingly setting the world on fire for a few weeks (“The Internet will never be the same” one proclaims) afterward — we certainly can’t pretend to know what the leading search engine is thinking or planning.

One thing we can say with certainty is that, for a long time now and probably for a while into the future, Google loves SEO-enhanced content.

DreamHost Glossary

SEO

Search Engine Optimization (SEO) is the practice of improving a site’s ranking in search results. Search results are aggregated based on a number of factors, including a site’s relevance and quality.

Read More

As a result, it’s thorough and generally lengthy articles (or Reddit posts) that often rank the best on Google’s search engine results pages (SERPs).

That’s all fine, right?

Well, there’s one problem with that — the rise of short-form content, especially video (thanks, TikTok!), is changing consumer preferences.

How do you strike the perfect balance?

You have to make content that’s robust enough for Google (and all search engines) that’s also easy for readers to navigate so they can engage with your website to find the value they’re seeking.

This is where anchor links come in.

With anchor links, you can very quickly send readers straight to a specific part of a page. That way, visitors can find the exact information they’re looking for instead of skimming through hundreds, or more often thousands, of words.

In this article, we’ll cover:

  • Exactly what anchor links look like and how they work.
  • The pros and cons of using anchor text on your pages or blogs.
  • Three ways to create anchor links on your WordPress website.

Let’s get to work!

Technically, an anchor link (aka anchor text or jump link) is any hyperlink within a page that usually points to another section on that same page.

To create one, you basically build a piece of code — don’t worry, we’ll show you how — around a URL to make it a “bookmark” of sorts. You can then attach that bookmark to any text or image on the same page. When someone clicks the bookmark, they’ll be quickly scrolled to the area of the page you’ve indicated with your code. If that didn’t make a lot of sense, hang tight; it will become clearer the more we talk about it!

In many cases, you’ll encounter anchor links within a table of contents (TOC) at the start of a page or post.

Screenshot Showing Toc Of A Dreamhost Post And How Some Anchor Links To Section Of Text While An Icon Anchor Links To Nav To The Top Of The Page
How To Create Anchor Links In Wordpress (3 Methods) 66

Other common examples of anchor links include buttons that return you to the top of the page when you reach the bottom. You can also use anchor links to help users navigate long landing pages.

Whether there’s a page or post on your website that’s a bit too long for manual scrolling, anchor links can help ensure you’ll capture visitor attention before you get a chance to deliver all the good stuff.

It’s important to note that search engines don’t claim that anchor links improve your search engine rankings directly. However, they do improve the experience for both users and the search engines that rank content.

Get Content Delivered Straight to Your Inbox

Subscribe now to receive all the latest updates, delivered directly to your inbox.

Overall, setting up anchor links can help improve content navigation. However, it’s not all sunshine and rainbows — there are a few downsides you may want to consider.

Here, we’ll explore both sides of the story.

Pro: Better Experiences All Around

With anchor text, readers can get a quick overview of your content, making them less likely to bounce and more likely to engage with it. In addition, web crawlers — bots that help search engines understand the content on the internet — can more quickly and clearly process lists.

Let’s dig a bit deeper into this advantage.

When rich snippets appear alongside top-ranking Google search results, they often include part of a page’s table of contents, which is usually created using anchor links. Google may also pull from a table of contents to populate the “People also ask” section at the top of the results page. In some cases, Google may even feature an article’s anchor text below the meta description using clickable links.

Screenshot Of A Google Search Result Showing Anchor Links Listed Right Below The Meta Description
How To Create Anchor Links In Wordpress (3 Methods) 67

All of these ways that Google uses anchor text and tables of contents help visitors understand what they’re going to find before they even click, which can help reduce your website’s bounce rate. That’s because you’re making life easier for users who might access the page, assume it’s not what they’re looking for because they don’t see what they want right away, and leave. Instead, you can keep them around much longer — more time for conversions! — by telling them exactly what they can find within a post or page and even linking them to it.

Pro: Easier Content Sharing

Anchor text makes it easy to share links that navigate to a specific section within an article. This is particularly useful when it comes to social media managers making posts, and support teams who need to share key parts of help articles with customers.

Con: Reducing Time On Site

If you’re measuring a metric like time on site to measure content and website performance, anchor links might actually reduce the average time visitors spend on your site because they can skip directly to the content they want instead of reading the entire article.

It’s up to you to balance making your visitors happy and your need to hit certain key performance indicators (KPIs).

Con: May Be More Difficult To Update Content Later

Over time, you may need to update your website domain or create 301 redirects, which will likely change links across your site. When changing links around, it can be hard to track down and update all the anchor text you’ve created to ensure every link is still fresh and accurate.

Notice the focus on the table of contents here? That’s because a TOC is probably the most impactful way to leverage anchor links on your website. However, it only makes sense to use anchor elements for long pages or blog posts. There’s no hard-and-fast rule, but anything above 1,500 words or so can likely benefit from a table of contents and its corresponding anchor links.

To add an anchor link to a shorter piece of content isn’t necessarily bad, but it can be less useful — making it a poor use of your time and possibly adding visual clutter for readers.

Staring down a long page or post you want to make more valuable for website visitors?

Luckily, creating anchor links is remarkably simple in WordPress!

You can do it either manually or with the help of plugins — both of which we’re going to dive into right now.

1. Add an Anchor Link Using HTML

All of the text you see on WordPress pages and posts is powered by HTML code. HTML, along with CSS and JavaScript, are some of the most-used programming and markup languages. If you can get even a little bit familiar with any of them, you’ll likely be able to do a lot more — with a lot less frustration! — on your WordPress site.

DreamHost Glossary

HTML

HTML stands for HyperText Markup Language. It is the most fundamental building block of the web and the standard markup language for creating web pages and applications.

Read More

So, we’ll start with showing you how easy it is to decipher and edit HTML!

First, choose the page or post where you want to add anchor links. We’re going to work with a blog post.

To create an anchor link, you first need to set an anchor. To do that, select a subheading that you want to link to, and click the three dots that show up on the right in the floating menu.

Screenshot Marking The Location Of The Three Dots, Far Right Hand Side Righta Fter The Hyperlink Icon
How To Create Anchor Links In Wordpress (3 Methods) 68

Select Edit as HTML near the bottom.

Screenshot Showing &Quot;Edit As Html&Quot; As The Lowest Choice From The Drop Down
How To Create Anchor Links In Wordpress (3 Methods) 69

What we need to do is add an HTML ID. That ID will be the anchor we’re going to link to later on. It will come before the name of the subheader you clicked on, in our case >Headline 3.

The format is: id=“anchor-name”. Our anchor name will be “headline-3.” Here’s what that code should look like when we’re done:

Headline 3

.

Screenshot Showing Html Id Tag As H2 Class=&Quot;Wp-Block-Heading&Quot; Id=&Quot;Headline-3&Quot; Headline 3
How To Create Anchor Links In Wordpress (3 Methods) 70

Once the ID is in place, you can attach it to text in your table of contents (or wherever else you want to place it) to create an anchor link!

In our example, we’ll scroll up to Headline 3 in the TOC, select it, and click the link icon that shows up in the hovering editing panel.

Screenshot Showing The Location Of The Link Icon, To The Right Of The Italics Icon
How To Create Anchor Links In Wordpress (3 Methods) 71

Into the link URL box, we’ll type in the ID we created, preceded by a #.

Screenshot Showing The Location Of The Link Icon, To The Right Of The Italics Icon
How To Create Anchor Links In Wordpress (3 Methods) 72

Hit Enter to make it official, save your work, then publish your changes. You won’t be able to see it in action inside the WordPress editor, so go take a peek at the finished page on your website to make sure it all works.

Manually creating HTML anchor links may seem intimidating if you’re not used to working with code. However, as you can see, adding anchor tags is remarkably simple. Once you know how the process works, adding these links manually should only take seconds.

If you want to create a link toward an anchor ID located on a different page or new tab, make sure to include the absolute URL of it, beginning with https.

2. Create Anchor Tags Using The Block Editor

Now, we’re going to show you how easy modern block themes make it to add an anchor link — no code required.

That’s because the Block Editor enables you to add HTML anchors or IDs without the need to switch over to the code view.

As with the previous method, the first thing you need to do is add an HTML ID or anchor to the text you want to link to. Select the text and open the settings menu from the square icon in the upper right corner.

Navigate to Block and open Advanced at the bottom. You’ll see a field called HTML anchor. All you need to do is add your unique anchor text within that field. We’ll go with “headline-3” again.

Screenshot Showing The Location Of The Block Editor Icon Which Looks Like A Box With A Rectangular On The Right Side
How To Create Anchor Links In Wordpress (3 Methods) 73

Now, we’re going to repeat the same steps from above:

  • Select the text you want to link your anchor to.
  • Click the link icon that shows up in the editing panel.
  • Type in # then the ID you just created.
  • Enter, save, publish, and check your work!

All that’s left to do now is repeat the process as many times as you need, depending on how many sections you want to add anchor links to. We love how easy the block editor makes this, especially if you deal with long-form content regularly (that’s us!).

Note: Not seeing all the cool block editor features we just covered? You may not be using a block theme! While you can certainly get away with adding anchor text in HTML, we do recommend upgrading to a block theme to take advantage of all the cool new features the WordPress community is adding every day. It’ll make your life easier! Start here to learn how to make the upgrade.

3. Link To An Anchor Quickly Using WordPress Plugins

It shouldn’t come as a surprise that there’s more than one WordPress plugin in the plugin directory you can use to add anchor links in WordPress.

  • The All in One SEO (AIOSEO) plugin (paid) has lots of features, one being easy-to-create tables of contents.
  • Link Whisper (paid) is a link optimization-focused that enables users to insert anchor links quickly.
  • With LuckyWP Table of Contents it’s right in the name — it’s all about creating linked tables of contents with just a few clicks.

Creating a table of contents for each of your posts can be a lot of work. You have to add multiple anchor IDs manually and create links one by one. Let’s zoom in on a solution that makes this task a little more approachable by automatically generating tables of contents for posts and pages within your website.

While the process should look decently similar for any plugin you choose, we’re going to walk you through the specifics of setting up a free, lightweight option — Easy Table of Contents.

To use the plugin, you first must navigate to Plugins > Add New Plugin in your WordPress editor.

Plugin Nav Showing Add New Plugin Selected
How To Create Anchor Links In Wordpress (3 Methods) 74

Search for Easy Table of Contents, use the Install Now button, wait for that to complete then click Activate to get it up and running on your site.

After you activate the plugin, you’ll need to configure its settings. Go to Settings in your WordPress admin sidebar and find Table of Contents.

Screenshot Showing The Settings Button In The Wp Nav
How To Create Anchor Links In Wordpress (3 Methods) 75

In the Enable Support menu, make sure both pages and posts are checked if you want to be able to use TOCs on both.

Now scroll down to Position, a setting which will enable you to decide where to display your tables of contents. At the time of this writing, by default, they’ll show up on posts and pages right before the first heading.

Right under it, the Show when setting lets you decide how many headings a post or page needs for the plugin to display a TOC. By default, the plugin will have a set number. Right now, that’s two. You can update either of these settings if you like.

Options For Easy Table Of Contents Plugin Showing Options For Position And Show When
How To Create Anchor Links In Wordpress (3 Methods) 76

There are a lot more settings on this page. Once you’re happy with everything, save your changes at the bottom of the screen and go to the post or page where you want to add the table of contents. We’ll go back to the blog post we’ve been working in.

At the bottom of the page, you’ll see a new section called Table of Contents. That means the plugin is working and will automatically set anchor IDs and generate a full table of contents leading to them!

Option To Toggle Off Automatic Toc Showing A Check Box Option To Disable The Automatic Insertion Of The Toc
How To Create Anchor Links In Wordpress (3 Methods) 77

You should see text indicating that a table of contents will instantly be inserted, as long as you leave the box unchecked. We like this feature because it makes it easy to turn off the table of contents for pages where it makes sense. We recommend scrolling and playing around with the settings again here to see if there’s anything unique you want to do with this post. For example, you can create a title for your TOC, move it around, exclude any headings you don’t want to appear, and lots more.

Keep in mind, these changes will only apply to this post and will override any global settings you just made over in the Settings menu.

Save your post, publish it, and go check out the live page to see your quick, easy, and fresh-to-death new TOC in action!

Screenshot Showing The View Of Table Of Contents With 1. Headline 1, 2. Headline 2, 3. Headline 3 Formatted
How To Create Anchor Links In Wordpress (3 Methods) 78

How Else Can You Upgrade Your WordPress Site?

Anchor links are incredibly useful elements for boosting SEO, as well as helping users navigate complex pages and long-form content. You can use anchor links in tables of contents, navigation menus, footnotes, and more. Thankfully, as you’ve seen, WordPress makes it simple to add anchor links to your content!

But using anchor links is just one of the many tricks you can implement to improve your website’s search engine rankings and user experience.

If you want to learn more about improving the WordPress experience as well as your all-important SEO ranking, here are a few additional tutorials you may want to check out:

Are you looking for a WordPress host that can help you serve long-form content to thousands of visitors without slowing down your site? DreamHost’s WordPress hosting packages are designed to handle large amounts of traffic while keeping your website fast.

How about a little help pulling off all that design, marketing, and more that running a successful business takes in this day and age? We also have plans to support you there. Check out all the offerings our awesome pro services team can deliver and craft your perfect website maintenance strategy today.

website management by DreamHost

WordPress Hosting

Unbeatable WordPress Hosting

Reliable, lightning-fast hosting solutions specifically optimized for WordPress.

See More

Jos Velasco is a WordPress Professional Consultant at DreamHost. His responsibilities include helping with advanced WordPress cases, creating training material, and identifying trends impacting the WordPress community. In his free time, he enjoys climbing mountains, eating healthy, and watching drama movies. Follow Jos on LinkedIn: https://www.linkedin.com/in/josvelasco/

Your Dream Website Is Just One Click Away

At Ericks Webs Design, we believe every business deserves a stunning online presence — without the stress. We offer flexible payment options, a friendly team that truly cares, and expert support every step of the way.

Whether you’re a small business owner, a church, or a growing brand, we’re here to bring your vision to life.

✨ Let’s build something amazing together.

— no pressure, just possibilities.

Latest News & Website Design Tips

Stay up-to-date with the latest insights, trends, and tips in business website design. Explore our newest articles to discover strategies that can help you elevate your online presence and grow your business.

Why Your Website is Your #1 Sales Tool in 2025

Why Your Website is Your #1 Sales Tool in 2025

The article “Why Your Website is Your #1 Sales Tool in 2025” highlights the importance of having an effective website as the key to driving sales for small businesses. It emphasizes that a well-designed website acts as a digital storefront, attracting customers with engaging content rather than clutter. With studies showing that consumers prefer informative articles over advertisements, businesses should focus on solid branding, SEO, and mobile-friendliness. Regular updates and maintenance are crucial to keep the site relevant. Ultimately, the article stresses that your website is your number one sales tool in 2025, urging small businesses to invest attention and care in their online presence.

Track & Improve Conversions with These Tools

Track & Improve Conversions with These Tools

The article “Track & Improve Conversions with These Tools” emphasizes the importance of transitioning casual website visitors into loyal customers for small and medium businesses in South Texas. It discusses leveraging tools like Google Analytics to understand audience behavior, A/B testing to optimize calls-to-action, and Hotjar to enhance user engagement. The article also highlights the role of social proof through testimonials and the significance of defining a unique selling proposition (USP) to stand out in a competitive market. With the right strategies and tools, businesses can effectively track and improve conversions, ensuring a successful online presence.

Capture More Leads with Popups (Without Being Annoying)

Capture More Leads with Popups (Without Being Annoying)

The article “Capture More Leads with Popups (Without Being Annoying)” explains how business owners can effectively use popups to attract leads while maintaining a positive user experience. Rather than appearing immediately, popups should be timed to appear after visitors engage with the site. Clear, friendly messaging and relevant offers tailored to site content are essential. Incentives, such as discounts, can encourage email sign-ups by fostering relationships. Testing various popup styles and ensuring they reflect the brand’s personality can enhance user connection. Ultimately, when used thoughtfully, popups can be a powerful tool for capturing more leads without being intrusive.

How to Use Social Proof to Drive Sales

How to Use Social Proof to Drive Sales

The article “How to Use Social Proof to Drive Sales” emphasizes leveraging social proof to enhance online presence and drive sales for local businesses. It highlights the importance of customer reviews, encouraging satisfied clients to share their experiences on platforms like Google and Facebook. Utilizing social media to showcase success stories and engaging with the audience is also recommended. Creating detailed case studies can provide evidence of results, while showcasing accolades and community involvement builds trust. Overall, businesses can harness social proof to strengthen relationships, establish credibility, and ultimately boost sales in a competitive digital landscape.

5 Website CTAs That Work Every Time

5 Website CTAs That Work Every Time

The article “5 Website CTAs That Work Every Time” emphasizes the importance of effective Call to Actions (CTAs) for improving website engagement. It highlights five key CTAs: “Get Your Free Quote Today!” encourages initial interaction; “Subscribe for Exclusive Tips & Tricks!” builds an email list while providing value; “Let’s Chat!” makes reaching out easy; “Check Out Our Portfolio” showcases previous work to build trust; and “Join Our Community” fosters a sense of belonging. The piece underscores that well-crafted CTAs transform a passive website into an engaging platform, ultimately boosting customer interaction and loyalty.

The Psychology Behind High-Converting Website Design

The Psychology Behind High-Converting Website Design

The article “The Psychology Behind High-Converting Website Design” highlights the importance of an effective website for boosting local businesses. It emphasizes that first impressions are crucial, as users form opinions within 50 milliseconds. Key elements for high-converting website design include visual hierarchy, clean layouts, and color psychology to evoke emotions. Engaging content is essential; it should resonate with the audience, tell stories, and feature clear calls to action. Building trust through easy navigation, social proof, and secure sites is vital for converting visitors into customers. Finally, the website should be adaptive, regularly updated to reflect new information and keep visitors engaged.

Create a Landing Page That Converts Like Crazy

Create a Landing Page That Converts Like Crazy

The article “Create a Landing Page That Converts Like Crazy” emphasizes the importance of an effective landing page for businesses of all sizes. It outlines key strategies to enhance conversions, starting with understanding your audience’s language and preferences. The author recommends using clear headlines, engaging visuals, and strong calls to action. Building trust through social proof, ensuring mobile responsiveness, and optimizing for SEO are also highlighted as crucial elements. Finally, the importance of monitoring analytics for continuous improvement is stressed. The article encourages business owners to collaborate with web design experts to create landing pages that truly convert.

Lead Magnets You Can Add to Your Website Today

Lead Magnets You Can Add to Your Website Today

The article “Lead Magnets You Can Add to Your Website Today” discusses how small business owners can enhance their online presence by using lead magnets. A lead magnet is an incentive, like a freebie, offered in exchange for a visitor’s email address. Suggested lead magnets include e-books, checklists, free trials, discount codes, webinars, and email courses, all designed to attract and engage potential customers. The article emphasizes the importance of making lead magnets easily accessible on your website and using analytics for performance tracking. It encourages businesses to embrace these strategies to convert visitors into lifelong customers, ultimately contributing to their growth.

Why You’re Losing Clients Without a Strong Homepage

Why You’re Losing Clients Without a Strong Homepage

The article “Why You’re Losing Clients Without a Strong Homepage” emphasizes the critical role of a well-designed homepage in attracting and retaining clients. It likens a confusing homepage to a messy store, which can drive potential customers away. A strong homepage should provide clear information about your offerings and resonate with the community, including using local visuals and language options. It’s vital to ensure mobile-friendliness and keep content updated to maintain engagement. A compelling homepage serves as a professional welcome mat for visitors, significantly impacting client retention. In summary, a strong homepage is essential for business success, especially in competitive markets like South Texas.