How to Add Anchor Links in WordPress (Step by Step):– We mostly use anchor links in or WordPress posts to help our users quickly jump to the other section which they want to be read. The anchor link are often used in a table form which is helpful to users move up or down the related article without reloading and switching off the page. It can also helpful with SEO as well as Google may show the navigation below your search listing.
Here in this post we will tell you step by step process of add anchor links in your WordPress. If you want to learn this then must read this article.
What is the Anchor Link in WordPress?
For know about this we need to understand that what is the anchor link.
In a simple way an anchor link is the link which allows you to go on specific place on that same page. Users can easily jump to the related section they are most interested in.
An anchor link are commonly used in the lengthier article in the table forms which allows to users to jump to the sections they want to read.
Why use an anchor links?
The numbers of users spend less time before deciding if they want to stay or leave your website. You have just those few seconds or minutes to attract your users and convince to stay. This is the best way to looking important information quickly.
Anchor links make this easier by allowing users to skip and rest on your webpage or content and jump directly to the part of interest them. This improves user experience and helps you win new users/readers. It is also great for WordPress SEO.
How to Add Anchor Links in WordPress?
If you want to add a anchor links in your article then you can easily do it manually.
You need to do two things for add an anchor text
First, create an anchor link with a #sign before the anchor text
Second, add the ID attribute to the text where you want the user to be taken.
Let’s start with the anchor link part.
Step.1. Create an anchor link
First you need to select the text that you want to insert the link button in the WordPress Gutenberg Editor.
Here you can see a popup to insert link where you usually add the URL for a post or page.
However, for an anchor link, you will simply use #prefix enter the keywords for the section which you want to the user to jump to.
Now click on the enter button to create the link.
There are we discuss some useful point for choose the text to create the anchor #link.
Use those keywords related to the section you are linking to
Don’t make your anchor link long or complex
Use hyphens to separate words and make it readable
You can use capitalization in anchor text to make it more readable like:- #hire-WordPress-Developer
Once you add the link then you are able to see the link that you have to create in the editor. Now clicking on the link not do anything. That is because browsers cannot find the anchor link as an ID.
Now fix that by pointing browsers to the section, text, area that you want to show when users click on anchor link.
Step.2. Add the ID Quality to the linked section
In the editor of your content, scroll down the specific area that you want the user to navigate when they click on the anchor link. Basically it is the main heading for a new section.
After that click to select block and then in the block settings click on the advance tab to expand it. You can easily click on the ‘Advanced tab’ under the heading lock settings.
Now you need to add the same text that you added as the anchor link under the ‘HTML Anchor’ field. Make sure you add the #prefix to add link. Now save your posts and see your anchor link by click on them. Make sure it open in preview tab.
If the section that you want to show is not a heading and show as well as regular paragraph or any other block then you need to click on the three-dot menu on the block setting and select ‘Edit ad HTML’.
This option will allows you to edit the HTML code for that particular block. You need to select and find the HTML tag which you want to point it.
Now You need to add your anchor as the ID attribute to tag, like the following code:
1 <p id=”hire-wordpress-developer”>
You need to click on the convert to HTML to preserve the change you made.