Preguntas técnicas de características y respuestas a preguntas tipo qué es

How to Create Anchor Links in WordPress (2026 Guide)

I spent weeks banging my head against WordPress trying to figure out anchor links. Tutorials kept saying «just add an ID» like I was supposed to know what that meant. So here’s the version I wish someone had handed me: blunt, practical, and actually tested.

If you want to know how to create anchor links in WordPress, you don’t need a plugin, you don’t need Elementor Pro, and you definitely don’t need to touch your theme’s functions.php. You need two things: an id on a heading, and a link that points to #that-id. That’s it. Everything else is decoration.

What an anchor link actually is (and why Google cares)

An anchor link is a URL fragment that jumps the reader to a specific spot on the same page. When you click a table of contents entry and the page scrolls to «Pricing», that’s an anchor doing its job.

Google’s own documentation on fragment identifiers confirms that anchors are treated as part of the URL. That means if someone searches for a specific phrase that only appears in one section of your 4,000-word guide, Google can surface your page and sometimes even the exact scroll position via featured snippets. That’s a real ranking advantage most bloggers completely ignore.

Internal links in WordPress — anchors included — also pass authority between sections of the same page, which matters more than people think. A pillar guide with a clean anchor structure outranks the same guide with a wall of text and no navigation. I’ve seen it happen on client sites.

How to create anchor links in WordPress, step by step

Here’s the method that works in the default Gutenberg editor in 2026 (WordPress 6.x and beyond).

  1. Open the post or page in the block editor.
  2. Click on the heading block you want to link to — a heading, not a paragraph.
  3. In the right sidebar, expand Advanced.
  4. In the HTML anchor field, type something short and lowercase: no spaces, no accents. Example: pricing, faq, step-two.
  5. Update the page.
  6. Now select any text elsewhere on the page, click the link icon, and type #pricing.

That last step is where 90% of people screw up. They paste a full URL instead of just the fragment. If you paste https://yoursite.com/page/#pricing, it works but it reloads the page. If you paste #pricing, it scrolls smoothly without a reload. Big difference in user experience, and Google’s Core Web Vitals notice it.

Doing it in Elementor

In Elementor, click the heading widget, go to the Content tab, and you’ll find a CSS ID field. Same rules: lowercase, no spaces. Then link to #that-id from any button or text widget. Elementor also has a built-in Table of Contents widget that auto-generates anchors from your headings — useful, but I’d still set manual IDs on the headings you care about most, because auto-generated IDs change if you reword a heading, and then every link pointing to it breaks silently.

The mistakes that quietly kill your anchor links

Three things break anchors more than anything else.

Duplicate IDs. If two headings on the same page both have id=»summary», the browser jumps to the first one and ignores the second. WordPress won’t warn you. You have to check manually or use a validator like the W3C Markup Validation Service.

Changing a heading’s anchor after publishing. Rename #pricing to #cost and every internal link pointing to #pricing becomes a dead fragment. Google crawls those and treats them as broken navigation signals.

Sticky headers covering the target. You click the anchor, the page scrolls, and the heading hides behind your fixed header. The fix is CSS: add scroll-margin-top: 100px; to your heading selector. One line, saves hours of frustration.

Anchor links vs internal links: they’re not the same thing

People mix these up constantly. An internal link connects two different URLs on your site — say, a blog post linking to a service page. An anchor link jumps within a single URL. Both help SEO, but they do different jobs.

Internal links distribute PageRank across your domain. Anchors improve time-on-page and reduce bounce rate by letting readers skip to what they want. You need both, but if your site is under 50 pages, prioritize internal links first. Anchors start paying off the moment your posts cross 1,500 words.

Google’s John Mueller has repeatedly said that anchor text in internal links helps Google understand what the target page is about. That applies to anchor-style links too — if your TOC entry says «WordPress permalink settings» instead of «click here,» you’re feeding Google context for free.

Why anchors boost SEO more than most people admit

The indirect SEO benefit is the one nobody talks about. Google’s ranking systems use engagement signals — not as a direct ranking factor, but as a quality filter through the helpful content system. If readers land on your 3,000-word guide, find the table of contents, jump to the answer in five seconds, and stay to read two more sections, that’s a positive engagement pattern.

If they land, scroll aimlessly, and bounce in 12 seconds, that’s a negative one. Anchor links are the cheapest way to flip that pattern.

There’s also the accessibility angle. Screen readers announce anchor links properly, and WCAG 2.2 guidelines treat in-page navigation as a core accessibility requirement. Google has confirmed accessibility and SEO overlap heavily — same signals, same fixes.

Frequently asked questions

Do I need a plugin to create anchor links in WordPress?

No. The Gutenberg editor and Elementor both have native anchor fields. Plugins like Easy Table of Contents just automate the process — handy on huge sites, unnecessary on a normal blog.

Can I link to an anchor on a different page?

Yes. Use the full URL plus the fragment: https://yoursite.com/guide/#step-two. The browser will load the page and jump to that section. Make sure the target ID actually exists or the link lands at the top of the page with no jump.

What happens if I change a slug after publishing?

Every internal link pointing to the old URL breaks. Set up a 301 redirect from the old slug to the new one immediately, and audit your internal links with a tool like Screaming Frog or the built-in WordPress broken link checker plugins.

How many anchor links is too many?

There’s no hard limit, but a table of contents with more than 12 entries starts looking like spam. Group sections. If your TOC needs a scroll bar, your page needs restructuring, not more anchors.

Do anchor links work on mobile?

Yes, and they matter more there. Mobile users scroll less patiently. A working TOC on mobile can double your average session duration compared to a page without one.

The bottom line: anchor links in WordPress are a five-minute setup with a disproportionate payoff. Do them right once, name your IDs like an adult, and you’ll never fight this problem again.