• I was encountering an issue where all of my RSS feeds contained duplicate information. I figured out the issue was not with the data itself, but that something was causing the feed output to be generated twice before output to the client.

    I found the culprit in Magic Fields 2. Line 318, in main.php calls the do_feed() function. Here’s the full block of code:

    // Process feeds and trackbacks even if not using themes.
      if ( is_robots() ) :
        do_action('do_robots');
        return;
      elseif ( is_feed() ) :
        do_feed();
        return;
      elseif ( is_trackback() ) :
        include( ABSPATH . 'wp-trackback.php' );
        return;
      endif;

    When commenting this the one line with do_feed(), everything works as intended.

    Question for the author: Why was this needed?

    https://wordpress.org/plugins/magic-fields-2/

  • The topic ‘do_feed() causes duplicate feed content’ is closed to new replies.