[Plugin: Wp-Thumbie] Caption shortcode shows up in description (SOLUTION)
-
WP-Thumbie is a great plugin. I noticed it didn’t strip [caption] shortcode, so when you have an image at the beginning of your post it will show up in related posts description, pretty ugly. I’m not code, but I spent some time and figured out how to get rid of it. Thought I share in case someone else needs it.
Look for wp-thumbie.php in the plugin’s directory. Now, look for this line:
$post_text = wp_trim_excerpt($post_text); // Get Post Ecerpt
Once you find it, you will need to paste this new line right after the one you just found:
$post_text = preg_replace("/\[caption[^>]+\[\/caption\]/i", "", $post_text);
This basically replaces [caption] with nothing. So, once you done this is what it should look like:$post_text = wp_trim_excerpt($post_text); // Get Post Ecerpt $post_text = preg_replace("/\[caption[^>]+\[\/caption\]/i", "", $post_text);It should work right away =)
Hope this helps you out.
The topic ‘[Plugin: Wp-Thumbie] Caption shortcode shows up in description (SOLUTION)’ is closed to new replies.