• Resolved twhb

    (@twhb)


    I’m using Reusable Blocks Extended with WooCommerce to write WooCommerce short descriptions like “[reblex id=’5′]”.

    When you use the built-in WordPress search, it’s normal that WooCommerce products show up. However, with a short description like above, they’ll show up with an excerpt like “[reblex id=’5′]”. That is, the un-rendered shortcode source code.

    Is there any fix or workaround?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jb Audras

    (@audrasjb)

    Hello @twhb and thank you for your comment!

    Sadly, the issue is with your theme, which doesn’t apply the the_content filter to short descriptions 🙁

    What is the name of your theme? Maybe I can suggest them a better implementation…

    (marking this issue as resolved since this is not something I can fix on my side 😉)

    Thread Starter twhb

    (@twhb)

    Hi, thank you for your reply.

    I don’t think the issue is with the theme. It occurs in both Astra and the default Twenty Twenty-One theme, and if I fix what’s displayed using add_filter('get_the_excerpt', 'do_shortcode'); in functions.php, that doesn’t fix that search returns results based on the shortcode source code, not what it renders.

    If you’re interested, I opened a WordPress support request/issue here: https://wordpress.org/support/topic/shortcodes-in-excerpts-5/.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shortcode not rendered in search result excerpts’ is closed to new replies.