Hello,
Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.
Unfortunately, Rank Math only detects the Table of Content if it is added with the compatible plugins from our list.
However, you can add the following piece of code to your theme’s functions.php file to disable the TOC test from Rank Math:
/**
* Filter to disable the table of contents test
*/
add_filter( 'rank_math/researches/tests', function( $tests, $type ) {
unset(
$tests['contentHasTOC'],
);
return $tests;
}, 10, 2 );
Please note that these tests are only there for your reference to help you in optimizing your pages/post content. If you feel any of them doesn’t apply to your page, please feel free to ignore them.
I hope that helps.
Thank you.
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.