• Hello,

    I am using your plugin and I’m very happy with it, thank you.

    I encountered a problem, which is your plugin does not parse shortcodes when rendering excerpts. This might not be a problem for most people, but in my case I use a shortcode to display a custom/dynamic text value at the very beginning of certain posts/products.

    I modified line 59 of includes/template/elements/class-excerpt.php in your plugin directory. In the public function render, instead of this:

    $output = wp_kses_post( $output );

    I wrote this:

    $output = wp_kses_post( do_shortcode($output) );

    I have had to disable your plugin updates so my modification isn’t overwritten; however I would really like to keep updating your plugin.

    Do you mind making this small alteration in your own code, please?

    Thank you and kind regards

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Code Amp

    (@codeamp)

    Hey @alfy40

    We don’t display shortcodes in excerpts intentionally.

    We tried to follow the way WP does this, and usually in a post list / archive, excerpts don’t process shortcodes.

    I will see what we can do to support this – we could add a filter so you can enable this via your themes functions.php instead of modifying our plugin directly.

    Need to think about this some more, and will let you know towards the end of the week.

    Thanks

    • This reply was modified 2 years, 3 months ago by Code Amp.
Viewing 1 replies (of 1 total)
  • The topic ‘Shortcodes not interpreted in excerpts’ is closed to new replies.