get( 'suppress_filters' ) ) return; // Bail if it's not our feed if ( ! $query->is_feed( self::$feed_slug ) ) return; // Change the feed content // Example: A feed for pages $query->set( 'post_type', array( 'page' ) ); } /** * Loads the feed template which is placed in wp-includes/feed-rss2.php. */ public static function feed_template() { load_template( ABSPATH . WPINC . '/feed-rss2.php' ); } } /** * Hooks into `init`. * * Note: add_feed() needs access to the global $wp_rewrite */ add_action( 'init', array( 'DS_Custom_Feed', 'init' ) );