• Adding a header to the Table of Contents adds that to the TOC itself. Is there a way to give the TOC a header or is the solution just using bold text instead of a H2?

    There’s also the weird behaviour where using H3 as the heading makes the TOC disappear completely. Other TOC plugins I’ve used allow H3 for the TOC heading.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Adding a header to the Table of Contents adds that to the TOC itself. Is there a way to give the TOC a header or is the solution just using bold text instead of a H2?

    Hi @jenxi I see what you mean, I would suggest adding the heading f using the Custom HTML block. You can use the following code <h2> Add heading here </h> This heading shouldn’t be included in the Custom HTML block.

    However, this can be requested as a feature of the block. It could be something similar to what you can use for the Table Block. I would suggest making an enhancement request below:

    https://github.com/WordPress/gutenberg/issues/

    Let me know if you need assistance.

    There’s also the weird behaviour where using H3 as the heading makes the TOC disappear completely. Other TOC plugins I’ve used allow H3 for the TOC heading.

    I think this depends on how the headings are structured, for example, if I add the first heading as h3 but the headings following that are in h2 this would affect how the headings are structured because they’re displayed in a hierachy.

    Thread Starter Jenxi Seow

    (@jenxi)

    Thanks @thelmachido I’ll file a request on GitHub.

    Thanks @jenxi l came across the issue, I will leave the link here for future reference.

    https://github.com/WordPress/gutenberg/issues/51129

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Creating a header for the Table of Contents’ is closed to new replies.