• Hello

    Im using block lab to create contet, so far, so good.
    But in one block template i use this PHP:

    `$categoria = block_value( ‘fichaspelis’ );
    $post_number = block_value( ‘cantidad’ );
    $paged = (get_query_var( ‘paged’ )) ? get_query_var( ‘paged’ ) : 1;
    $args = array(
    ‘post_type’ => ‘post’,
    ‘post_status’ => ‘publish’,
    ‘category_name’ => $categoria,
    ‘posts_per_page’ => $post_number,
    ‘paged’ => $paged,
    );
    $arr_posts = new WP_Query( $args );

    if ( $arr_posts->have_posts() ) :

    while ( $arr_posts->have_posts() ) :
    $arr_posts->the_post();
    ?>

    Then in one div, I call “the_excerpt();”, and after that, JSON error shows in the block editor, impossible to see results in the front end, because it wont save the page.

    I realized that if i take away “the_excerpt()”, the block and the front page, works perfect, but of course, without the post’s excerpt, wich by the way its called from a “trim_excerpt” function that uses “the_content” to generate the “fake” excerpt.

    WHat can I do??

    THank you!

Viewing 1 replies (of 1 total)
  • I’m seeing this issue too (though not linked to the Block Lab plugin). When adding the_excerpt to a Block template, we get the JSON error on saving/updating the post.

    I wonder if it’s linked to another plugin – we’re running Polylang and ACF Pro, if that’s any help?

    Best wishes
    Marcus

Viewing 1 replies (of 1 total)
  • The topic ‘JSON error if templates loads the_excerpt();’ is closed to new replies.