Hello,
We’re sorry to hear that you’re experiencing issues with the table of contents. It seems that you’re encountering compatibility issues with the table of contents from the free version of Rank Math.
To resolve this issue, you can try disabling the test for the table of contents by adding a piece of code to your theme’s functions.php file or rank-math.php file. Here’s the code snippet you can use:
/**
* Filter to disable the table of contents test
*/
add_filter( 'rank_math/researches/tests', function( $tests, $type ) {
unset(
$tests['contentHasTOC'],
);
return $tests;
}, 10, 2 );
Once you’ve added this code snippet, Rank Math will completely ignore the test for the table of contents while analyzing your content.
If you’re still facing the issue after adding the code snippet, please feel free to open a support ticket directly from here, and we’re always here to help.
We hope this helps! If you have any other questions or need further assistance, please let us know.
Sources:
How to Add Rank Math’s Table of Contents Block » Rank Math
Why Isn’t Rank Math Detecting the Table of Contents? » Rank Math
How to Use a Table of Contents to Improve Content Readability » Rank Math
It seems to work. Thank you.
Hello,
We’re delighted to hear that this issue has been resolved.
I’m closing this ticket now but if you ever have another question or need any help in the future, please don’t hesitate to create a new forum topic. We’ll be more than happy to assist you again.
Thank you for choosing Rank Math and have a wonderful day!
Cheers