TOC Block only shows static header and not tailored to each post. Theme: 2024

#821277
  • Resolved Falasteen Now
    Rank Math free

    As per Jack’s reply to my Youtube comment, Rank Math TOC Block supports default themes like Twenty Twenty Four. Unfortunately, Atm, I can’t “reuse” design for the ToC and need to reedit it for every new post. Otherwise, the ToC will not populate correctly. Instead the exact same header from where the “saved” design will be shown.
    Here’s all the plugin installed fyi:
    Complianz – Terms and Conditions
    Complianz | GDPR/CCPA Cookie Consent
    Fastly
    Rank Math SEO with AI SEO Tools
    Simple Cloudflare Turnstile
    Two Factor
    WP Super Cache
    WPFront Scroll Top

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

    I apologize for the inconvenience you are facing with the Rank Math TOC Block not being tailored to each post in the Twenty Twenty Four theme.

    To resolve this issue and have a unique Table of Contents design for each post, you can follow these steps:

    1. Edit Theme Files:

      • Open your theme’s functions.php file.
      • Add the provided PHP code snippet to convert the Rank Math TOC Block into an accordion.
      • Save the changes to the functions.php file.
    2. Custom CSS:

      • Open your theme’s style.css file.
      • Add the provided CSS code snippet to style the TOC Block.
      • Save the changes to the style.css file.

    By following these steps, you can add a toggle button to the Rank Math Table of Contents block, allowing it to expand and collapse when clicking on headings, ensuring a unique design for each post.

    If you encounter any difficulties or need further assistance, please feel free to ask.

    Thank you for bringing this concern to our attention.

    Best regards.

    Sources:
    How to Add Rank Math’s Table of Contents Block Ā» Rank Math

    Where do I find the “provided PHP code snippet” and “CSS code snippet to style the TOC Block”?

    Hello,

    Thank you for contacting Rank Math support.

    Can you please share a screenshot and or link to the YouTube comment you’re referring to? That’d give us context for the issue you’re experiencing.

    Where do I find the ā€œprovided PHP code snippetā€ and ā€œCSS code snippet to style the TOC Blockā€?

    You don’t have to worry about this for now. You can follow the bot’s guide only if you want to style your TOC website-wide, in which case you’d use custom CSS targeting the TOC class:

    .wp-block-rank-math-toc-block
    

    Thank you for your patience and cooperation. We are looking forward to hearing back from 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 3 replies - 1 through 3 (of 3 total)

The ticket ‘TOC Block only shows static header and not tailored to each post. Theme: 2024’ is closed to new replies.