Rank Math stopped detecting TOC

#35857
  • Resolved Zapa
    Rank Math free

    Hi!

    I noticed that my TOC stopped being deteted by Rank Math from some time ago. I’m using Table of Content Plus (one of the most popular plugins for those things).

    I have tried disabling and enabling plugins for other conflicts. Reinstalling Rank Math. Even asking support to my hosting service. Nothing fixed it.

    Some help would be appreciated. Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    We made a recent change in v1.0.37 where TOC test support for CM Table Of Contents, Easy Table of Contents, f(x) TOC, HM Content TOC, Shortcodes Ultimate, Simple TOC, Table of content, Table of Contents Plus, Thrive Architect, Fixed TOC was removed.

    You will need to add this support by adding the following code snippet on your theme’s functions.php file:

    /**
     * Filter to add plugins to the TOC list.
     *
     * @param array TOC plugins.
     */
    add_filter( 'rank_math/researches/toc_plugins', function( $toc_plugins ) {
           $toc_plugins['plugin-directory/plugin-filename.php'] = 'Plugin Name';
        return $toc_plugins;
    });

    Replace :
    plugin-directory with the name of the plugin folder
    plugin-filename.php with the name of the main plugin file in the folder
    Plugin Name with the name of the plugin

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Zapa
    Rank Math free

    Sorry, but I’m confused now.

    Of course I will do it but wouldn’t it be easier if you add it to your supported plugins again? I have wasted A LOT of time trying to figure out what the hell was happening.

    Hi Michael, I have the latest update but for some reason my TOC is till showing? I have TOC coded by myself, and it works great, but as this is not part of the supported TOC list it shows as an error. Is there a way to turn this off?

    https://www.dropbox.com/s/i664gnlr0bvln2o/toc-error.jpg?dl=0

    Todd
    Rank Math free

    Hi Zapa,

    We removed the code after much consideration. There are 10s of ToC plugin and if we add the support for every ToC plugin in our plugin, things could get out of hand quickly and it would mean creating useless code for 1000s of users who do not use ToC plugins or use one but the redundant code is added run anyway which eventually leads to a slower plugin.

    That is why we have Asked the ToC plugin authors to add it within their plugin and some of them have added it already:
    https://rankmath.com/kb/score-100-in-tests/#table-of-contents

    In fact, we have already added the compatibility to the Table of Content Plus’s repo and you have to contact their support so they can add it:
    https://github.com/zedzedzed/table-of-contents-plus/pull/138

    You can add the code yourself too.
    https://pastebin.com/RUdAkgMm

    Just make sure to change the file location. This applies to you as well @indidginus

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    • This reply was modified 4 years, 1 month ago by Todd.

    Also what do you mean by when you say “Just make sure to change the file location”? What file are you referring to?

    Zapa
    Rank Math free

    Ok I understand but I find it weird that you removed what is probably the most popular plugin with more than 300k downloads.

    I doubt that they pay attention to a user like me.

    Anyway I put the code and it works. I used the code snippets plugin just in case somebody has it.

    Thanks for your answer.

    Hi Todd, I ran that code when you first sent it to me 4 weeks ago and it didn’t work to remove the TOC warning message from within RankMath Page Edit, and you mentioned that the code doesn’t work in Gutenberg and that you were working on an update:

    https://support.rankmath.com/ticket/content-readability-error/

    Todd
    Rank Math free

    Hi Zapa,

    I am so glad to hear that it is working fine for you.

    Michael, I would request you to not hijack other’s posts.

    I have re-opened your previous ticket so please free to followup there.

Viewing 8 replies - 1 through 8 (of 8 total)

The ticket ‘Rank Math stopped detecting TOC’ is closed to new replies.