How manually make Table content

Viewing 4 replies - 1 through 4 (of 4 total)
  • why not using plugin ?

    it could be manual, but it would be very tiring.

    Hi there,

    Thanks for getting in touch with us today.

    Here is a tutorial that I came across that you may find useful when implementing this:

    Simple Table of Contents (ToC) Using Pure HTML and CSS Code

    I hope this info helps. Thank you.

    Can RankMath recognize my TOC after applying this method because I know half of it but I don’t perform any CSS over my TOC but RankMath doesn’t recognize it?

    Hello,

    Thank you for contacting Rank Math today.

    Unfortunately Rank Math looks for an installable TOC file within the plugins folder and thus won’t be able to detect the TOC file.

    You can however add the following code snippet to your theme’s functions.php file to remove this test and and add the score to a different test:

    /**
     * Rank Math snippet to disable 'contentHasTOC' test.
     *
     * @param array  $tests Array of tests with score
     * @param string $type  Object type. Can be post, user or term.
     */
    add_filter( 'rank_math/researches/tests', function( $tests, $type ) {
    	
    	unset($tests['content-readability']['contentHasTOC']);
    
    	$tests['basic']['keywordInMetaDescription']['score'] = 4;
    
        return $tests;
    }, 10, 2 );

    Looking forward to helping you. Thank you.

    ​​​​​​

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

You must be logged in to reply to this ticket.