Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter justfreebies

    (@justfreebies)

    is anyone offering help?

    Hello, I,ve visited your site and I don’t see any problem with shortcodes.

    In case you are still interested, I had the same problem you have, and I solved it with the following line:

    $text = preg_replace( ‘|\[(.+?)\](.+?\[/\\1\])?|s’, ”, $text);

    This regular expression does the job. Just use it befero you echo the post excerpt.

    Good Luck,
    Avantix

    Hi ! Well, just what I needed. In fact, I had a problem with WP AutoSuggest plugin, which works great (for now), except it was showing the_content or the_excerpt with shortcode (from NGGallery plugin), which I don’t want.
    So, anyway, thank you …

    damn regex…
    much appreciated code
    thx

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to remove short code from post excerpt’ is closed to new replies.