How to Create Anchor Links in WordPress

How to Create Anchor Links in WordPress

If you want to make your website or blog more user-friendly and professional, you need to think carefully about page navigation. This is where the “anchor link” comes into play. So, what exactly is an anchor link, and how do you create one in WordPress? Let’s explore the details.

What Is an Anchor Link?

An anchor link is a clickable link that takes the user directly to a specific section of a webpage. This means visitors can instantly jump to the content they want without scrolling manually. It’s especially useful in long blog posts, guides, or detailed articles.

For example, if your blog post includes sections like “About Us,” “Our Services,” or “Contact,” you can create an anchor-linked table of contents at the top of the page. This allows users to go directly to the section they’re interested in with a single click.


How to Create an Anchor Link in WordPress

Creating anchor links in WordPress is quite easy, whether you’re using the Classic Editor or the Block Editor (Gutenberg).


1. Assign an ID to the Section

First, you need to assign an id to the heading or section you want to link to.

If You’re Using the Classic Editor:

Switch to the HTML view and add an id to the heading, like this:

<h2 id="hakkimizda">About Us</h2>

If You’re Using Gutenberg (Block Editor):

  1. Select the heading block.
  2. Open the settings panel on the right side.
  3. Under the Advanced section, find HTML Anchor.
  4. Enter a simple anchor name, for example: hakkimizda.

2. Create the Anchor Link

Once you have assigned the id, you can add your anchor link.

In the Classic Editor:

<a href="#hakkimizda">Go to About Us section</a>

In the Block Editor:

  1. Select the text you want to turn into a link.
  2. Click the link icon.
  3. Enter #hakkimizda in the URL field.

Now, clicking this link will automatically scroll the page to that section.


3. Using Anchor Links in Menus or Buttons

Anchor links are not limited to text inside blog posts—you can also use them in navigation menus, buttons, or widgets.

To add an anchor link to a menu:

  1. Go to Appearance → Menus.
  2. Add a Custom Link.
  3. Enter #hakkimizda in the URL field.
  4. Save the menu.

You can apply the same method for buttons, widgets, or CTA sections.


Advantages of Using Anchor Links

Improved User Experience

Anchor links help visitors jump directly to the section they care about—especially important in long articles.

SEO Benefits

Internal page navigation helps Google understand your content structure and encourages users to stay longer on your page.

More Organized Content

Adding a table of contents makes your writing look more professional and easier to read.


Things to Consider When Using Anchor Links

  • Avoid spaces in ID names; use lowercase letters and hyphens, such as contact-section.
  • You can add anchor links to all headings to create a full table of contents.
  • Make sure anchor links work properly on mobile devices as well.

Conclusion

Using anchor links in WordPress improves your website’s user experience and supports SEO performance. In long articles, guides, and detailed blog posts, anchor links help visitors navigate your content effortlessly and enhance the overall professionalism of your site.

Now you can easily create anchor links on your WordPress website and offer your readers a smoother, more intuitive navigation experience.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top