Categories
AMP On WordPress Experiments

Free Compatible AMP Table of Contents WordPress Plugin

Here is what an AMP Table of Contents looks like, a live example of this post :

Table of Contents

This blog Netnaps is an AMP Native site, using the AMP in a Standard Mode both Mobile and Desktop Sites are AMP

With the Free Original AMP Plugin

What’s the most common Table of Contents Plugin for WordPress?

I recently was searching for a good table of contents plugins that are completely compatible with the AMP Standard mode, while searching for I found most commonly used table of contents plugin to be the Easy Table of Contents but unfortunately that gave a clear AMP validation error.

The plugin had a 20,000+ Active Installs, its regularly updated and is free.

Cons  

Not compatible with AMP Plugin, as it uses a javascript on the frontend.

What Worked as Table of Content Plugin for AMP?

The plugin that worked without any problems with the AMP Validations is the SimpleTOC

Simpletoc amp compaitaible plugin

This simply worked without giving any problems on an AMP Site like ours, but still, everything has some Pros and Cons.

Pros and Cons

  • 100% AMP Compatible
  • Free No Premium
  • Lightweight Lean Simply Filters the Heading Titles and makes a clean table
  • Add anywhere in the post as a Block

Cons  

  • Filters all the headings i.e you can not select what should be excluded from the Table of contents.
  • SEO Plugins like Rank Math don’t include this in the SEO score for on-page SEO.
  • Not Compatible with SEO Plugins that use a Schema Block like How-To Blocks, I am using Rank Math Free and couldn’t add the Table of Content to the post that uses a How-To schema block as an “H3” Heading. Contacted the developer and here is some communication we had Problems with the blocks

I am using the free version of the AMP Plugin the Original AMP, and also recommend the same to anyone but if by chance you are using the other AMP for WP plugin Accelerated Mobile Pages you have to shell out around $39 for using the Simple Table of Contents as a paid extension of the plugin.

amp table of contents

So this plugin Saves $39 for yours if you use the free Amp Plugin with the Simple TOC as a table of contents.

Update for Rank Math and Rank Math Pro Users

As in the post above, I have mentioned the plugin is not compatible with the Rank Math Plugin for your SEO Scores. So I opened this as a new Topic with the Developer of the Plugin at the WordPress Forums

If you would like to have a look over the topic problems with the blocks, a simpler fix will be just adding a simple filter code as per the Rank Math’s Documentation

/**
 * Filter to add plugin to the TOC list Support for Rank Math Seo Plugin.
 *
 * @param array TOC plugins.
 */
add_filter( 'rank_math/researches/toc_plugins', function( $toc_plugins ) {
       $toc_plugins['simpletoc/plugin.php'] = 'simpletoc';
    return $toc_plugins;
   }
  );

You can also remove this code once the Developer includes this kind of support in the plugin itself, by adding this to the Rank Math Score on the page will give a valid check on the Table of Contents being used also in the AMP Standard Mode.

Conclusion

The free plugin SimpleTOC is lightweight simple and free and also available on GitHub

By Rahul Kharbanda

Hi,
I am Rahul Kharbanda from India. I hope you like all the content I made. Welcome to comment & connect.
I am on Quora , Github , Twitter

Leave a Reply

Your email address will not be published. Required fields are marked *