Pop Up Image

Get the Full PDF guide to creating an online store with WooCommerce (88 pages) for FREE

A comprehensive database for everything WordPress related.

TOP
WPKlik Logo Newsletter

Sign up and receive a free copy of How to Create an online Store with WooCommerce (full guide)

anchor-link-in-wordpress

How to Create an Anchor Link in WordPress

Introduction

It is always a good idea to provide your visitors with a dynamic experience while they browse your website’s content. Moreover, including some interactivity can surely benefit your site and engage the audience. Including anchor links in your textual content can definitively give you that additional flare. That’s why we’ll show you how to create an anchor link in WordPress in this article.
Anchor links are essentially a one-page navigation method. Namely, you can set certain pieces of text (e.g. headings or titles) to lead to other bits of text (like a paragraph) when clicked. This provides readers with a satisfying, effective and easy-to-use navigation method, all within the same page.

Creating an Anchor Link

So let’s get to the point; how do you create an anchor link? We’ll present this process in a few simple and easy-to-follow steps.

For the sake of making an example, let’s say that you’d like the page to scroll to the third paragraph of your text when the heading is clicked on.

a

First off, to achieve this, you should switch from the Visual to Text editing mode. You’ll notice these two tabs in the top right corner of the editor.

a

Locate the starting point of the text bit you wish the anchor link to lead to (in this case the third paragraph). Next, paste this <a id=”anchor”></a> in front of the paragraph. Note that we are using the word anchor only as an example here, and you can put any word you like between the quotation marks.

a

The next step is to mark the actual anchor link. To achieve this, you should return to Visual editing mode by clicking the top right tab. Now let’s link the paragraph to the heading. Select the heading, and click the Link icon from the menu above. Insert this link #anchor.

Please note that the word you insert here should correspond to the word you entered for the part you wish to link to. We put anchor in both places, however you can pick any other word as long as the word from the link matches the word used in the linked part.

a

All that’s left at this stage is to click update at the top right of the page and preview the changes you made. Once you are on the live website, you’ll now be able to get the page to automatically scroll down to the third paragraph once you click the heading. In addition to this, you can create anchor links for any of the sections you pick and see fit.

Conclusion

This rounds up the entire process. We hope we have been successful in conveying how simple it is to create an anchor link in WordPress. Moreover, this article should provide you with all the knowledge needed to create as many anchor links as you’d like; just remember to use a different link word for each new anchor on the page, and you’re all set!

We hope that you found this article to be helpful. If you liked it, please feel free to check out some of these articles as well!

Newsletter

WordPress perfection at your fingertips.

If you enjoyed this article, feel free to subscribe to our newsletter using the form below. You can also follow us on Facebook and Twitter and subscribe to our YouTube channel for WordPress video tutorials.

Leave a Reply