the_excerpt doesn’t work with custom blocks
-
Hello guys,
I developed custom blocks for my news blog posts and the_excerpt is not working anymore.
<!-- wp:qsd/section --> <!-- wp:qsd/container {"className":"container"} --> <!-- wp:paragraph --> <p>Hello World.</p> <!-- /wp:paragraph --> <!-- /wp:qsd/container --> <!-- /wp:qsd/section -->
That’s my structure of every blog post. If i create a simple paragraph before the custom block the_excerpt is working for that paragraph.
I tried stuff with get_the_content(), serialize_blocks(), parse_blocks() and str_replace(). But this solution is so messy!! There must be another way, right?
Thanks for help!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘the_excerpt doesn’t work with custom blocks’ is closed to new replies.