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 );
The filter should be added to your active theme’s functions.php file. Here’s another way to apply the filter using the rankmath.php file:
https://rankmath.com/kb/filters-hooks-api-developer/#adding-filters-and-hooks-in-rank-math-php
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.
I am not referring to a table of contents. It is about a comparison table which is a key component of the site.
Hello,
I apologize for the confusion. Even so, Rank Math still won’t be able to read the contents of the table you created since it is not supported.
However, we have added API access to the content analysis in the Rank Math plugin to make content from the shortcodes that were generated by TablePress to be readable by Rank Math.
You would need to contact the developer of the plugin you mentioned by showing the following link:
https://rankmath.com/kb/content-analysis-api/
After the API is applied. Rank Math should be able to read its content.
I hope that helps. Thank you, and please don’t hesitate to contact us if you need further assistance.
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.