Website Pricing Guide

Enter your email to get instant access to our website pricing guide.

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.

Best Practices for Online Store Design

Best Practices for Online Store Design

Creating a successful online store in South Texas requires a focus on user experience (UX), appealing visuals, credibility, SEO, and content engagement. Prioritize easy navigation and mobile optimization for a seamless experience. Use high-quality images and compelling descriptions to attract customers. Implement trust-building elements like customer reviews and secure payment options. Optimize your site for SEO by integrating relevant keywords and maintaining a blog to keep content fresh. These best practices will help local businesses design online stores that resonate with their audience and drive sales.

Keyword: Online Store Design

What Pastors Should Know Before Redesigning Their Website

What Pastors Should Know Before Redesigning Their Website

For pastors considering a church website redesign, understanding your audience is crucial. Prioritize engaging content that resonates, such as bilingual resources and video sermons, to foster community connection. Ensure your website is visually appealing and mobile-friendly to attract visitors. Incorporate clear calls to action for better engagement and consider professional help to achieve desired outcomes. Lastly, measure performance using analytics and budget wisely for impactful changes. By focusing on these aspects, you can create an online presence that truly reflects your ministry.

How to Write Product Descriptions That Sell

How to Write Product Descriptions That Sell

Summary:

To boost your online presence and sales, writing compelling product descriptions is essential. Understand your audience by highlighting both the benefits and features of your products. Use engaging, approachable language and storytelling to connect emotionally with potential customers. Optimize your descriptions for SEO with relevant keywords and include a clear call-to-action. For small business owners in South Texas, these strategies can elevate your product descriptions and attract more customers.

Keyword: Product descriptions that sell

Professional Services Websites That Elevate Your Brand

Professional Services Websites That Elevate Your Brand

A professional services website is crucial for elevating your brand and attracting clients. It should reflect your essence with appealing design and engaging content that resonates with your audience. Incorporating effective SEO strategies enhances visibility on search engines, helping your business stand out. Regular maintenance ensures your site remains fresh and functional. By focusing on these elements, you can transform your online presence into a powerful tool for growth, making it essential for local businesses in South Texas to engage with their community and thrive online.

What You Need to Know About Shipping Integration

What You Need to Know About Shipping Integration

Summary:

Shipping integration is vital for small businesses in South Texas, enhancing efficiency, customer satisfaction, and cost-effectiveness. By seamlessly connecting your website with shipping carriers, you automate processes like order tracking and shipping cost calculation, allowing more focus on growth. The article emphasizes choosing the right e-commerce platform and carriers, automating order processing, and regularly monitoring your integration’s performance. Investing in shipping integration not only streamlines operations but also boosts sales and trust among customers.

Keyword: Shipping integration.

Technology Web Design That Powers Innovation

Technology Web Design That Powers Innovation

In South Texas, small and medium businesses often struggle to enhance their online presence due to the complexities of web design. A well-designed website is crucial for attracting customers and generating leads. Ericks Web Design specializes in creating intuitive, mobile-responsive websites that reflect each business’s uniqueness. Additionally, effective Search Engine Optimization (SEO) boosts visibility, acting as a silent salesperson. By prioritizing user experience and accessibility, businesses can stand out online. Let’s collaborate to power innovation through technology and design, making your digital dreams a reality.

How to Handle Orders and Payments Securely

How to Handle Orders and Payments Securely

In today’s digital landscape, securing online transactions is essential for small businesses in South Texas. This guide from Ericks Web Design emphasizes key strategies for handling orders and payments securely. Important steps include selecting a trusted payment gateway, implementing SSL certificates, promoting transparency in policies, regularly updating software, and educating customers on safe practices. Enhancing online security not only protects sensitive information but also builds customer trust, ultimately driving sales. Prioritize “secure online transactions” to bolster your business credibility.

Tech Company Websites That Make a Digital Impact

Tech Company Websites That Make a Digital Impact

In today’s digital landscape, having an impactful website is essential for local businesses. Key elements include a visually appealing design, mobile-friendly layout, effective SEO strategies, and clear calls-to-action to engage customers. Connecting with your audience through storytelling enhances your brand’s identity. Regular updates are crucial to maintain relevance, preventing customer frustration. At Ericks Webs Design, we specialize in transforming local businesses in McAllen and beyond into digital powerhouses, ensuring they stand out online. Invest in a professional website to make a significant digital impact and attract more customers.

How to Add Products to Your Website the Smart Way

How to Add Products to Your Website the Smart Way

Summary:
In "How to Add Products to Your Website the Smart Way," Ericks Webs Design outlines effective strategies for small business owners in South Texas. Key steps include understanding your audience, choosing the right e-commerce platform, creating engaging product listings with compelling descriptions and high-quality images, optimizing for SEO with local keywords, and simplifying the checkout process. By following these guidelines, businesses can enhance their online presence and improve customer engagement.

Keyword: Online shopping experience

Small Business Website Design That Grows With You

Small Business Website Design That Grows With You

A well-designed website is crucial for small businesses, helping them reflect their unique identities while adapting to growth. Key factors include responsive design that evolves with business needs, maintaining authenticity to connect with customers, and providing useful information as a central hub. Regular maintenance ensures optimal performance, supporting online presence and SEO. In McAllen and beyond, partnering with local experts like Ericks Web Design can elevate your website and enhance visibility, fostering long-term success. Consider a design that not only meets current demands but also grows alongside your business aspirations.