Site logo

Archived topic

Horizontal Table of Contents

11 replies · Started by Mihail on December 2, 2022

Viewing posts 1–12 of 12

Hello, I want to build a Table of Contents similar to Healthline.

Here's an example of the ToC I am trying to build. https://www.healthline.com/health/cold-flu/flu

https://imgur.com/KfE5YCU

As you can see, the hyperlinks in the ToC are different than the actual h1,h2, and h3 tags. This allows more headings to appear in the snippet section in the Search Engines.

I searched for plugins, but I can't find one that does this. Are you familiar with any such plugins?

If not, how can I recreate this manually for every blog post using GeneratePress and GenerateBlocks?

Thank you,
Mihail.

Hi there,

i am sorry but i am not aware of any plugins that do that, you may want to ask the support for one of the ToC plugins, as they may be able to advise if its possible to change the label.

Otherwise you would have to manually create those links using something like a GB button block.....

Thank you for the reply David,

I am just curious, do you think Healthline does it manually, or is there a custom code used for their ToC?

The GB button block is doing a fantastic job, and I think this is the way to go for what I am looking to do.
https://imgur.com/HWOC7ru

I am also curious about whether the GB Button Blocks will appear as Rich Snippets in Google, like Healthline.
https://imgur.com/7w6yzAG
https://imgur.com/A8S5nyR

Thank you!
Mihail.

How do Healthline do it?
I cannot say for certain, it looks like a server side function ( the equivalent of a ToC ) plugin is auto creating those.

Using GB Buttons only add display on the front end of your site, they won't show in the SERPs rich snippet. That would require some JSON-LD or other schema for that.

Thank you for the reply David,

I appreciate your reply, this cleared up a few things for me.

One last thing, is there a way I can add JSON-LD for the GB Buttons, so they will appear in the SERPs rich snippets?

Kind regards,
Mihail.

Ah ok, actually those are Jump to links, and Google scrapes them from your site where you have valid anchors for each section of the page. They are not related to the buttons HTML. What they are is google seeing there is a jump link going to an anchor linked section - more info here:

https://www.sebkln.de/en/tutorials/seo-jump-links/

How you make sure google displays them, thats not something we can control.

Hello,

Thank you for the reply David,

I read the article you sent me, and I added Jump to Links from the buttons to the H2 headings, following this Generatepress Youtube Video: https://www.youtube.com/watch?v=f_OaAiJ3oV4&t=169s

I implemented it on one of my posts (I attached the URL in the credentials), disabled the Easy TOC plugin, and Re-indexed my post on Google. I am waiting to see whether it will appear as Rich Snippets on Google.

Can you please check if I did it right?

Thank you,
Mihail.

Looks correct to me.

I appreciate the help! This solved the problem! Impressed with what GP can do!

Glad to be of help

I like this option.

Thanks David.

Glad to hear you found that useful :)

This archived topic is closed to new replies.