WordPress输出RSS格式分类标签:the_category_rss

WordPress模板标签the_category_rss用于输出RSS格式的分类,必须用在The Loop主循环中。

the_category_rss( string $type = null )

函数参数

$type

字符串值,默认值:rss2

RSS的版本,可选的值如下:

  • rss2
  • rss
  • rdf
  • atom

函数使用示例

以rss2格式输出分类:

<?php the_category_rss() ?>
<guid><?php the_permalink($id); ?></guid>

扩展阅读

the_category_rss()函数位于:wp-includes/feed.php

相关函数:

阿里云