Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter emot1onz

    (@emot1onz)

    Thanks for your answer @bcworkz. You are right, i use a render_callbacks for my blocks. But i also save the InnerBlocks, thats why i dont understand that the_excerpt cant “see” the content:

    export default function save() {
        return <InnerBlocks.Content />
    }
    

    I now solved the problem like this:

    $excerpt = wp_trim_excerpt($post->post_content);
    $clean_excerpt = wp_strip_all_tags($excerpt);
    echo substr($clean_excerpt, 0, 200).'...';

    Any improvement tips are welcome!

Viewing 1 replies (of 1 total)