Support » Plugin: Simple Masonry Layout » How to remove shortcodes from excerpt

  • This plugin is really neat and works fine!
    I just came across a minor annoyance: post excerpts that include shortcodes (that is: any text with [code] inside) from any other plugin is shown under the image.

    Simple fix, get to line 195 and replace it with this:

    <?php if (has_excerpt ($post->ID)) the_excerpt(); else echo '<p>' . strip_shortcodes(wp_trim_words( get_the_content(), 20 )) . '</p>'; #this is where shortcodes get nasty ?>

    No more shortcodes!

Viewing 1 replies (of 1 total)
  • Plugin Author Tako


    Thank You Steve, I thought I had already done on my latest update. But It was not. My Bad 🙁

    Thank You once again 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘How to remove shortcodes from excerpt’ is closed to new replies.