do_feed_rss2

Load either the RSS2 comment feed or the RSS2 posts feed.

Description

do_feed_rss2( (bool) $for_comments ); 

Parameters (1)

0. $for_comments (bool)
True for the comment feed, false for normal feed.

Usage

  1. if ( !function_exists( 'do_feed_rss2' ) ) { 
  2. require_once ABSPATH . WPINC . '/functions.php'; 
  3.  
  4. // True for the comment feed, false for normal feed. 
  5. $for_comments = true; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = do_feed_rss2($for_comments); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/functions.php  
  1. function do_feed_rss2( $for_comments ) { 
  2. if ( $for_comments ) 
  3. load_template( ABSPATH . WPINC . '/feed-rss2-comments.php' ); 
  4. else 
  5. load_template( ABSPATH . WPINC . '/feed-rss2.php' );