WordPress anchor links can be a major pain to setup. You want to users to click and get to another part of your page, but the links just don’t work!
Well after a reader emailed us asking for a explanation of the WordPress codex page, I wanted to help! Those codex pages can get a little codey, rather quickly.
So I figured I’d break down how to setup anchor links in WordPress but manually, and using Elementor so you get an anchor link smooth scroll.
Check out the full WordPress anchor links steps here:
If you can’t watch, here are the steps below:
WordPress anchor links explained:
- First, create your link and add a #keyword where the link normally would go
[html]<a href="#yourID">Click here</a>[/html]
- Then, setup a header with your id further down the page, like this:
[html]<h2 id="yourID">Header text</h2>[/html]
- Thats it!
If you were able to create an anchor link in WordPress with this guide or have any questions, we’d love to hear from you below!
Read your blog, Thanks a lot for sharing your thoughts. Really the information you have shared is incredible.
Appreciate it for your great effort to share this wonderful post.
Such a great article, your article very helpfull for me and clear all my doubts so thanks for sharing this post
Hi Greg,
Great Tutorial. Loved it.
Gutenberg editor actually makes it insanely easier. You won’t have to deal with any HTML. You can anchor links by just entering it on the anchor text box.
BTW, we have recently launched a Gutenberg blocks plugin named “Ultimate Blocks” which has an advanced ‘Table of Contents’ Block. It will make things more easier.
You can check out the plugin here: https://wordpress.org/plugins/ultimate-blocks/
If you are using Gutenberg, give it a try. Hope you’ll like it.
Now a days,Anchor Links is quite important after google’s algorithm, google bots crawl anchor link and wordpress is providing this feature will be best for all developer and website maker.