do_feed_rss2

函式
do_feed_rss2 ( $for_comments )
引數
  • (bool) $for_comments True for the comment feed, false for normal feed.
    Required:
相關
  • load_template()
定義位置
相關方法
do_feed_rssdo_feed_rdfdo_feeddo_feed_atomadd_feed
引入
2.1.0
棄用
-

do_feed_rss2: 這是一個WordPress函式,可以生成當前文章的RSS 2.0 feed: 這個函式可以在模板檔案中呼叫,以顯示網站上最新的文章的feed。

載入RSS2評論feed或RSS2文章feed。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function do_feed_rss2( $for_comments ) {
if ( $for_comments ) {
load_template( ABSPATH . WPINC . '/feed-rss2-comments.php' );
} else {
load_template( ABSPATH . WPINC . '/feed-rss2.php' );
}
}
function do_feed_rss2( $for_comments ) { if ( $for_comments ) { load_template( ABSPATH . WPINC . '/feed-rss2-comments.php' ); } else { load_template( ABSPATH . WPINC . '/feed-rss2.php' ); } }
function do_feed_rss2( $for_comments ) {
	if ( $for_comments ) {
		load_template( ABSPATH . WPINC . '/feed-rss2-comments.php' );
	} else {
		load_template( ABSPATH . WPINC . '/feed-rss2.php' );
	}
}

常見問題

FAQs
檢視更多 >