Last Updated on January 28, 2020 by Christopher G Mendla
I was trying to get a simple anchor link working in a WordPress header using Gutenberg. Through some trial and error I was able to get the anchor link working
An anchor link is a link on a page that allows you to link directly to that part of the page. I wanted to link from a category description to a section of a page with random images where I had images of the canal in the town.
The general method is to:
Go to the place in your document where you want the anchor. Create a header using a header block.
Next, look for the block controls on the right. Be sure you are still focused on the header block. Click the triangle to expand the ‘advanced’ section.
Enter a name for your anchor. KEEP IT SIMPLE. One word is good. If you use multiple words, you will see Gutenberg translate spaces into dashes. CASE COUNTS. When you link, you need to specify the EXACT case of the anchor text. In this case, I simply called it “canal”
Be sure to update your post. If you are using server caching, you might need to clear the cache of the page.
This was where it got a bit tricky. I tried searching for the anchor text using the link maker but couldn’t find it. The following did work
In this case, the link to the page was
When I added the target, it became
The window for the link is a little small but you can right arrow to the end where you can add the target.
Featured image from BarelyDevi / Pixabay
Your email address will not be published. Required fields are marked *
Save my name, email, and website in this browser for the next time I comment.