TOC block

#760541
Viewing 10 replies - 1 through 10 (of 10 total)
  • Hello,

    I apologize for the inconvenience you are facing with the TOC block on block themes like Twenty Twenty-Four for categories. To address this issue, you can try adding the following code to your theme’s functions.php file:

    
    /**
     * Convert Rank Math FAQ Block Into Accordion
     */
    function turn_rm_toc_collapsable() {
        ?>
    
            jQuery(document).ready(function() {
                var tocItems = jQuery("div.wp-block-rank-math-toc-block");
                tocItems.bind("click", function(event) {
                    var nav = jQuery(this).find("nav");
                    if (nav.css("overflow") == "hidden") {
                        nav.css("overflow", "visible");
                        nav.css("max-height", "100vh");
                    } else {
                        nav.css("overflow", "hidden");
                        nav.css("max-height", "0");
                    }
                });
            });

    Sources:
    How to Add Rank Math’s Table of Contents Block » Rank Math
    How to Add Rank Math’s Table of Contents Block » Rank Math
    Score 100/100 With Rank Math Post Tests » Rank Math
    How to Add Rank Math’s Table of Contents Block » Rank Math

    Hello,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    Please note that the Table of Contents block is only for Gutenberg or the block editor and only works on your single post types. It will not work on your taxonomy pages.

    With that said, if this is something we can implement in the future, we will announce it on our other communication channels and the changelog page: https://rankmath.com/changelog/

    Hope that helps and please don’t hesitate to let us know if you have any other questions.

    Thank you.

    I think Gutenberg is in my theme even though it’s a complete block. Please implement the change, as there are more and more full block themes like mine.

    I’ve updated Sensitive Data.

    Alhan
    Rank Math free

    Hello,

    We logged in to your site using the provided access details in the sensitive data section of this ticket.

    Upon checking we can confirm that what my team mate is suggesting is correct and this is as intended.

    The TOC block is working as it should on the pages and posts but it will not work on the taxonomy or terms archive pages.

    Please refer to the screenshot below :
    https://monosnap.com/direct/kzt0ggCCVSj0S4DNGzcy09OFLPJMzs

    We hope that helps, and please don’t hesitate to get in touch if you have any other questions.

    Thank you.

    I’m removing the TOC in the categories, waiting for you to implement it.

    I did not receive a second notice that you reconnected to the staging site. Have you checked the new URLs in Sensitive Data?

    Hello,

    The TOC will never be made compatible with the taxonomy pages because that doesn’t hold any value neither for the users of search engines, only on the actual posts and pages that have some value in terms of SEO and content organization.

    We don’t need to check the website because the plugin is working as intended as we mentioned before.

    Don’t hesitate to get in touch if you have any other questions.

    Let me know if you change your mind, because the categories in my sector (free online games) are extremely important. Even much more than the posts I publish!

    Hello,

    We understand that the categories are important for your website and that is true for many other websites, but even so, the TOC won’t be beneficial for those so we don’t envision this to be added to those pages.

    Thank you.

    Could you explain what Rankbot suggests? If you don’t want to implement the solution but I can do it, so be it!

    Hello,

    What the RankBot is sharing is the code to make the TOC collapsible and it’s not related to this matter.

    The TOC from our plugin cannot be added to such pages.

    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.

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

The ticket ‘TOC block’ is closed to new replies.