How to Create Anchor Links in WordPress: The Ultimate Step-by-Step Guide

In the digital age, user experience and seamless navigation are paramount for any successful website. Whether you run a blog, an e-commerce site, or a business platform, guiding your visitors effortlessly through your content can significantly boost engagement and SEO. One of the most effective techniques to achieve this is by using anchor links. If you’re wondering how to create anchor links in WordPress, this comprehensive guide will walk you through everything you need to know — from basics to advanced tips — ensuring you master this essential skill for 2025 and beyond.


Why You Should Learn How to Create Anchor Links in WordPress

Before diving into the step-by-step process, it’s important to understand the value of anchor links:

  • Improved User Navigation: Anchor links allow users to jump directly to specific sections of a long page without endless scrolling, saving time and frustration.
  • Enhanced SEO Performance: Search engines appreciate well-structured content. Anchor links help organize information, making your site easier to crawl and index.
  • Better Engagement: Visitors are more likely to stay and interact with your content when they can easily find what they need.
  • Professional Appearance: Websites that use anchor links look more organized and user-friendly.
  • Increased Accessibility: Anchor links assist screen readers in navigating through content, improving website accessibility.
  • Boosted Content Sharing: Anchor links can be shared to direct readers to precise points in your content.
  • Mobile Optimization: On mobile devices, anchor links reduce excessive scrolling, improving the overall mobile experience.
  • Facilitated Content Navigation: For tutorials, FAQs, or product descriptions, anchor links allow users to access relevant parts swiftly.

Knowing how to create anchor links in WordPress is a powerful tool that benefits both site owners and visitors alike.


What Are Anchor Links?

Anchor links (also called jump links or page anchors) are hyperlinks that point to specific locations within the same page or on another page. Unlike regular links that navigate users to different web pages, anchor links scroll smoothly to targeted sections or headings on a single page, enhancing navigation significantly.


How to Create Anchor Links in WordPress: Various Methods Explained

There are several ways to create anchor links in WordPress. Whether you’re using the block editor, classic editor, or page builders, you’ll find a method that suits your skill level and website structure.


1. How to Create Anchor Links in WordPress Using the Block Editor (Gutenberg)

The Block Editor offers a straightforward approach to adding anchor links:

  • Add an HTML Anchor to a Block: Select any block (like a heading or paragraph), open the block settings sidebar, and locate the “Advanced” section. Here, you can enter an “HTML anchor” — a unique identifier without spaces (e.g., section1).
  • Create a Link Pointing to the Anchor: Highlight the text where you want the clickable anchor link. Use the hyperlink tool and type #section1 (matching your anchor). This link will jump the user to the block with the corresponding anchor.
  • Use Descriptive Anchor Names: For better SEO and clarity, name anchors related to their section content, like #contact-us or #faq.
  • Test Your Anchor Links: After saving your page, click the anchor link to ensure it scrolls smoothly to the target block.
  • Multiple Anchor Links on a Single Page: You can add several anchors throughout your content to create a table of contents or navigation menu.
  • No Coding Required: Gutenberg makes anchor creation accessible to beginners, eliminating the need for manual HTML editing.
  • Accessibility Considerations: Anchor links in Gutenberg support screen readers, enhancing the accessibility of your page.
  • Use Smooth Scroll Plugins for Better UX: For smoother scrolling animation, consider installing plugins that enhance anchor link behavior.

2. How to Create Anchor Links in WordPress Using the Classic Editor

If you’re still using the Classic Editor, here’s how to manually add anchor links:

  • Switch to Text/HTML Mode: Open the post or page editor and switch to the “Text” tab to edit the HTML.
  • Add an ID Attribute to the Target Element: Insert an id attribute within the HTML tag where you want the anchor (e.g., <h2 id="section2">Section Title</h2>).
  • Create a Hyperlink Pointing to the ID: Highlight text where you want the link and insert a hyperlink with #section2 as the URL.
  • Use Unique and Meaningful IDs: Avoid spaces and special characters for smooth functioning.
  • Preview and Test: Save and preview your page to check that clicking the link jumps to the specified section.
  • Manual Control: This method offers more precise control for advanced users comfortable with HTML.
  • Cross-Browser Compatibility: Anchor links created this way work reliably across all modern browsers.
  • Combine with CSS for Smooth Scrolling: Adding a small CSS snippet can improve user experience by animating the scroll rather than a sudden jump.

3. How to Create Anchor Links in WordPress Using Page Builders (Elementor, Beaver Builder, Divi)

Most popular page builders support anchor links through user-friendly interfaces:

  • Set an Anchor or ID on a Section or Widget: In Elementor, edit the section settings and input a CSS ID like pricing in the Advanced tab.
  • Create a Button or Text Link to the Anchor: Use the link field and type #pricing to make the link point to that section.
  • Use Menu Anchor Widgets: Some builders like Elementor have dedicated “Menu Anchor” widgets designed specifically for anchor links.
  • Easily Build One-Page Sites: Anchor links are perfect for one-page websites where navigation scrolls to sections instead of loading new pages.
  • Customize Scroll Effects: Many builders include options for smooth scrolling, offset adjustments, and animation speed.
  • Responsive Testing: Preview how anchor links behave on tablets and mobiles to ensure consistent user experience.
  • Integrate with Sticky Navigation Menus: Combine anchor links with sticky headers to enhance usability.
  • No Coding Skills Required: Page builders make anchor creation intuitive, perfect for beginners and pros alike.

4. How to Create Anchor Links in WordPress Menus

You can also add anchor links directly into your WordPress navigation menu:

  • Add a Custom Link: Go to Appearance > Menus, select “Custom Links” from the left panel.
  • Enter the Anchor URL: For example, enter #about-us in the URL field.
  • Add Link Text: Type the menu label like “About Us” and click “Add to Menu.”
  • Assign the Menu Location: Ensure the menu is assigned to the desired location, such as the primary menu.
  • Save and Test: Visit your site and click the menu item to jump to the anchored section.
  • Use for One-Page Websites: Anchor links in menus simplify navigation for single-page designs.
  • Avoid Broken Links: Make sure the anchored sections exist on the page or use full URLs if linking across pages.
  • Customize Menu Appearance: Use CSS or plugins to style anchored menu items distinctly.

Best Practices When Learning How to Create Anchor Links in WordPress

To maximize the impact and functionality of your anchor links, keep these tips in mind:

  • Use Clear and Descriptive Anchor Names: This improves SEO and user clarity.
  • Avoid Spaces and Special Characters in Anchors: Stick to letters, numbers, and hyphens.
  • Keep Anchor Links Visible: Don’t hide anchor targets inside collapsible sections unless necessary.
  • Add Smooth Scrolling for Better UX: Sudden jumps can confuse users.
  • Test Anchor Links Across Devices and Browsers: Ensure consistent behavior everywhere.
  • Maintain Accessibility Standards: Use ARIA landmarks and roles where applicable.
  • Avoid Overloading a Page with Too Many Anchors: Too many can overwhelm users.
  • Link to Relevant Sections Only: Ensure anchor links provide real value and easy navigation.

Frequently Asked Questions About How to Create Anchor Links in WordPress

Q1. Can I create anchor links without plugins?
Absolutely! WordPress’s native editors (both Gutenberg and Classic) support anchor links without additional plugins.

Q2. Are anchor links good for SEO?
Yes, anchor links improve site structure, reduce bounce rate, and enhance user experience—all positive signals for SEO.

Q3. How do I create anchor links to other pages?
You can link to a specific section on another page by using the full URL followed by #anchorname, like https://example.com/page#section1.

Q4. Can anchor links be used in WordPress widgets?
Yes, you can add anchor links inside text widgets or custom HTML widgets.

Q5. What if my anchor link doesn’t scroll correctly?
Check for CSS issues like fixed headers overlapping anchor targets. Adding scroll offset fixes often resolves this.

Q6. Can I add animated scrolling for anchor links?
Yes, plugins and JavaScript snippets can add smooth animated scrolling effects.

Q7. Do anchor links work on mobile devices?
Yes, anchor links work perfectly on mobile browsers and improve navigation on small screens.

Q8. Is it necessary to use unique IDs for anchors?
Yes, IDs must be unique per page to avoid conflicts and unexpected behavior.


Conclusion: Master How to Create Anchor Links in WordPress Today

Knowing how to create anchor links in WordPress is a simple yet powerful way to enhance your website’s navigation, improve user engagement, and boost SEO. Whether you use the Block Editor, Classic Editor, page builders, or menus, anchor links make long pages manageable and professional. Start implementing anchor links today and see the positive impact on your visitors’ experience.

If you found this guide helpful, share it with fellow WordPress users and leave your questions or tips in the comments below. Take your site’s navigation to the next level by mastering anchor links now!