Table of Contents plugin

#753821
  • Resolved Anonymous
    Rank Math free

    Hi,

    I’m trying to use the RankMath table of contents plugin but I don’t seem to have the option to install it.

    I’m using Avada theme builder if that helps. Please advise. Thank you!

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

    I’m sorry to hear that you are facing issues with installing the Rank Math Table of Contents plugin. If you are using the Avada theme builder, you might need to manually add the necessary code snippet to your theme’s files for Rank Math to detect the Table of Contents section.

    To do this, you can follow these steps:

    1. Create a rank-math.php file in your theme’s directory if it doesn’t exist already.
    2. Add the following code snippet to the rank-math.php file:
    /**
     * Filter to add plugins to the TOC list.
     *
     * @param array TOC plugins.
     */
    add_filter( 'rank_math/researches/toc_plugins', function( $toc_plugins ) {
           $toc_plugins['plugin-directory/plugin-filename.php'] = 'Plugin Name';
        return $toc_plugins;
    });
    1. Replace 'plugin-directory/plugin-filename.php' with the path to your TOC plugin file inside the WordPress plugins folder.
    2. Replace 'Plugin Name' with the name of your TOC plugin.

    After adding this code snippet, Rank Math should be able to detect that you are using a Table of Contents section in your posts.

    If you encounter any difficulties or need further assistance, please feel free to reach out. Thank you for bringing this to our attention!

    Sources:
    How to Use a Table of Contents to Improve Content Readability » Rank Math
    Why Isn’t Rank Math Detecting the Table of Contents? » Rank Math
    Score 100/100 With Rank Math Post Tests » Rank Math
    How to Add Rank Math’s Table of Contents Block » Rank Math

    Anonymous
    Rank Math free

    Hi,

    For step 1, where can I locate the theme directory?

    Hello,

    For clarification, the Rank Math Table of Content block is not a plugin, as it is available when you’re using the block editor

    toc

    If you’re using Avada’s Table of Content feature, then you will need to follow the steps we have previously shared so Rank Math can detect that you’re already using one

    toc

    For step 1, the theme directory can be found on your WordPress dashboard > Appearance > Theme File editor

    tfe

    If it’s not available on your theme, then you can follow any of the steps here on how to add filter on your site:
    https://rankmath.com/kb/filters-hooks-api-developer/

    Hope that helps.

    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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Table of Contents plugin’ is closed to new replies.