Table of Content not detected by Rank Math?

#83042
  • Resolved Murielllina
    Rank Math free

    I need the GutenTOC Plug in for tables of Content. However, the Rank Math Suite does not recognise it. What can I do now? I read that I might put in a snippet? But where? I have never programmed any Plug-ins, I just need the normal WordPress Dashboard options.

    Thank you for your help.
    I appreciate it.

    best regards,
    Muriel

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

    Thank you for contacting Rank Math today.

    Head over to WordPress dashboard > Appearance > Theme Editor then select the functions.php file and add the following code:

    
    /**
     * Filter to make GutenTOC plugin compatible with Rank Math
     *
     * @param array TOC plugins.
     */
    add_filter( 'rank_math/researches/toc_plugins', function( $toc_plugins ) {
           $toc_plugins['gutentoc-advance-table-of-content/gutentoc.php'] = 'GutenTOC - Table of Content Gutenberg Block';
        return $toc_plugins;
    });
    

    Looking forward to helping you. Thank you.

    ​​​​​​

    Thank you sir, I did it as described. Unfortunately, it does not work so well:
    Aktualisierung fehlgeschlagen. Die Antwort ist keine gültige JSON-Antwort (page update failed – no JSON).
    What should I do?

    By the way, it looks like the toc is not seen by rank math

    I took the code out of functions again and the message disappeared.

    Hello,

    Does that mean the issue is resolved?

    You can also use this code in your theme’s functions.php file to manually tell Rank Math that you are already using a Table of Contents and to pass that test.

    https://pastebin.com/RUdAkgMm

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

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘Table of Content not detected by Rank Math?’ is closed to new replies.