Please share

Adding page anchors in WordPress (or links within a page in WordPress) has always involved looking at the html view of the editor to add your anchor tags. With the Gutenberg editor, this has now become a lot easier to do, and one of the many reasons I personally enjoy writing blog posts with Gutenberg.

Improve SEO - Add Page Anchors in WordPress Gutenberg

In this how-to post, I’m going to show you how easy it is to add page anchors in WordPress Gutenberg, and how to link to them. I’m also going to show you an alternative way of doing them if your theme uses a sticky menu header. The issue with sticky menu headers is the anchor point you link to is usually hidden under the sticky header. It’s a bit more work, and not an ideal way to add page anchors in WordPress Gutenberg, but it works.

Table of Contents

  1. Why You Should Add Page Anchors in WordPress
  2. Option A: Add Page Anchors in WordPress
  3. Option B: Adding Page Anchors in Themes with Fixed Headers
 

Why You Should Add Page Anchors in Your Posts

There’s really two main reasons you would want to add anchors on your posts in WordPress, especially for long form posts – I’m talking about 1,000 word and longer posts here. Firstly, it makes it easier for your blog or site visitors to understand the sections included in your post, and it makes it easier for them to navigate to the sections they’re looking for.

Secondly, when writing long form posts (which Google loves, by the way), the content structure is important and Google even wrote about using named anchors to section your posts as they will index and deep link to those anchors . So ultimately, adding anchors in your long form posts are also good for SEO. Google says to make sure the sections are well structured and broken down into distinct and logical sections, use descriptive anchor names – not just “section_a”, for example, and use a table of contents which links to your anchors.

There you go – straight from Google!