[Plugin: Yet Another Related Posts Plugin] YARPP and shortcodes (2 posts)

  1. michaeltyson
    Posted 6 years ago #

    I noticed shortcodes don't get evaluated or removed in post excerpts.

    This fixes it:

    magic.php, line 202:
    $post_content = strip_tags(preg_replace("/\[[a-zA-Z][^\]]+\]/", "", apply_filters_if_white('the_content',$result->post_content)));

  2. @michaeltyson - Hmm... are you sure it's actually displaying the $post_content as the excerpt? In most cases, YARPP will display the $post_excerpt, and just use the $post_content in case the $post->excerpt isn't set.

Topic Closed

This topic has been closed to new replies.

About this Topic