• Resolved sergeyprysiazhny

    (@sergeyprysiazhny)


    Hi guys, maybe you can help, I’m trying to add a “Table of Contents” block to the sidebar (via widgets) but it doesn’t work, I tried also block code directly to template, via code, but it does’t help too.

    <!-- wp:yoast-seo/table-of-contents -->
    <div class="wp-block-yoast-seo-table-of-contents yoast-table-of-contents"><h2>Table of contents</h2></div>
    <!-- /wp:yoast-seo/table-of-contents -->

    In the template I try to use the_content filter

    {!! apply_filters('the_content','<!-- wp:yoast-seo/table-of-contents -->
    <div class="wp-block-yoast-seo-table-of-contents yoast-table-of-contents"><h2>Table of contents</h2></div>
    <!-- /wp:yoast-seo/table-of-contents -->') !!}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Table of contents block not working in widget area’ is closed to new replies.