Block reference of Table of Contents.

#755387
  • Resolved Frank Berrocal
    Rank Math free

    Hi and good day.

    I am creating a custom template for a customer and I need to provide access only to only authorized blocks. One of those is Table of contents, but I am trying to find the block reference to include it in the list of blocks.

    const allowedBlocks = [
    “core/heading”,
    “core/image”,
    “core/paragraph”,
    “core/video”,
    “core-embed/youtube”,
    “core/list”,
    “seo-by-rank-math/wp-block-rank-math-toc-block”,
    ];

    No modification is needed, I just need the correct reference. I am using that example as a failed guess.

    For reference
    https://developer.wordpress.org/block-editor/reference-guides/core-blocks/

    Thank you:

    Frank Berrocal
    f*****************@i*********

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for reaching out with your query about including the Table of Contents block in your list of authorized blocks for a custom template.

    The correct block reference for the Rank Math Table of Contents block is:

    "rankmath/table-of-contents"

    You can update your allowedBlocks array as follows:

    const allowedBlocks = [
        "core/heading",
        "core/image",
        "core/paragraph",
        "core/video",
        "core-embed/youtube",
        "core/list",
        "rankmath/table-of-contents",
    ];

    This reference will allow you to include the Rank Math Table of Contents block in your custom template for authorized blocks.

    If you need further assistance or have any more questions, feel free to ask.

    Thank you!

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

    This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.

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

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