Anyone know how to strip the caption shortcode from the_content_rss output? HTML markup for the img itself gets stripped, but the caption shortcode remains...
I have tried strip_shortcode, remove_shortcode, remove_all_shortcode but to no avail.
Anyone know how to strip the caption shortcode from the_content_rss output? HTML markup for the img itself gets stripped, but the caption shortcode remains...
I have tried strip_shortcode, remove_shortcode, remove_all_shortcode but to no avail.
I am also in need for a solution to this problem. I have an XML-file a partner needs to use, but I can't seem to get rid of the [caption]-part of posts with images in them.
Does this require some preg_replace or something? If so, can anyone point me in the direction of a solution?
this was posted somewhere else:
add to the feed.php file
$content = apply_filters('the_content_rss', $content); /* already was there, here is for navigation. it's near 164 line */
$content = preg_replace("/\[caption.*\[\/caption\]/", '', $content); /* string itself */
if ( $cut && !$encode_html ) /* next line, for navigation too */
I'm having the same problem. And I'd like to try the code given above too, but only thing is I can't find a feed.php. Help anyone?
You must log in to post.