• Resolved cheonmu

    (@cheonmu)


    hello. I used the Post Grid block to display posts. However, if the Excerpt of the post includes a shortcode, the shortcode is also displayed in the grid.

    Screenshot -> https://i.imgur.com/o4Umb9C.jpeg

    In my case, toc is displayed.

    Is there a way to solve this problem by preventing shortcodes from being included?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support mohsinbsf

    (@mohsinbsf)

    Hi @cheonmu,

    Thanks for getting in touch with us.

    I am afraid this is not possible with the provided options in the Spectra. We’d love to take this as a suggestion. I will surely convey your feedback to our concerned developers. We are always keen to listen to our customers and to receive their feedback. This is the best way to improve our products and services and maintain our client’s satisfaction. ??

    Have a nice day!

    Thread Starter cheonmu

    (@cheonmu)

    Hi

    This issue can be temporarily resolved by modifying the class-uagb-post.php file.


    From

    if ( 'full_post' === $attributes['displayPostContentRadio'] ) {
    $excerpt = get_the_content();
    } else {
    $excerpt_length_fallback = UAGB_Block_Helper::get_fallback_number( $attributes['excerptLength'], 'excerptLength', 'post-timeline' );
    $excerpt = UAGB_Helper::uagb_get_excerpt( $post->ID, $post->post_content, $excerpt_length_fallback );
    }

    to

    if ( 'full_post' === $attributes['displayPostContentRadio'] ) {
    $excerpt = strip_shortcodes( get_the_content() );
    } else {
    $excerpt_length_fallback = UAGB_Block_Helper::get_fallback_number( $attributes['excerptLength'], 'excerptLength', 'post-timeline' );
    $excerpt = UAGB_Helper::uagb_get_excerpt( $post->ID, strip_shortcodes( $post->post_content ), $excerpt_length_fallback );
    }

    I hope this helps if anyone is experiencing the same problem.

    thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.