Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need to remove an iframe tag that is causing my feed not to work. Here is the url of the validator VALIDATOR. The url of the feed is Natural Nigerian Feed. Please could someone tell me what to do. It's been very frustrating. Here is the code I have written to handle it but it is not working

function rss_noiframe($content) {
      // filter out iframe here
    $content = preg_replace( '/<iframe(.*)/iframe>/is', '', $content );
    return $content;
} add_filter('the_excerpt_rss', 'rss_noiframe'); add_filter('the_content_feed', 'rss_noiframe'); add_filter('the_content_rss', 'rss_noiframe');
I put this code inside the template's function.php but to no avail

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.