We provide Professional Web Hosting!

 

How to add an anchor link in WordPress

Home > How to add an anchor link in WordPress
 
Posted by on November 17, 2019 in | Comments

An Anchor link is what we use in a longer than usual post that allows users to easily jump to the section they would like to read.  For example, having an anchor link in a table of contents will allow a user to click on the desired heading and take them straight to the section they are most interested in reading.

You can manually enter an anchor link in your desired post by adding two things for it to work accurately:

Step 1. Creating an anchor link with a # before the anchor text

  • Select the text that you want to link and then click on the insert link button. It will show the insert link option where you can generally add the URL or look for a post or page to link.
  • But for an anchor link you just easily use # as a prefix followed by the keywords you want a user to be able to jump to, then click on enter to create the link, for example, #colt-host-blog

Here are some tips on choosing the correct text to use as your anchor # link:

  • Use the keywords related to the section you are linking to.
  • Don’t make your anchor link unnecessarily long or complex.
  • Use hyphens to separate words and make them more readable.
  • Capitalise each word in anchor text to make it more readable. For example, #Colt-Host-Blog

Step 2. Add the ID attribute to the linked section that you want the user to be taken to

  • In the content editor, move down to the section that you want the user to navigate to when they click on the anchor link, for example, a heading or a heading for a new section.
  • Click to select the block and choose Advanced Settings to expand the tab.
  • Add the same text that you added as the anchor link under the ‘HTML Anchor’ field, without the # prefix.
  • Then save your post and see your anchor link in action by clicking on the preview tab.

 

About ColtHost.com

ColtHost.com - Professional Web Hosting & Domain Name Services

 

 
Need quality web hosting? Join us today