feed-rss.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * RSS 0.92 Feed Template for displaying RSS 0.92 Posts feed.
  4. *
  5. * @package WordPress
  6. */
  7. header( 'Content-Type: ' . feed_content_type( 'rss' ) . '; charset=' . get_option( 'blog_charset' ), true );
  8. $more = 1;
  9. echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>'; ?>
  10. <rss version="0.92">
  11. <channel>
  12. <title><?php wp_title_rss(); ?></title>
  13. <link><?php bloginfo_rss( 'url' ); ?></link>
  14. <description><?php bloginfo_rss( 'description' ); ?></description>
  15. <lastBuildDate><?php echo get_feed_build_date( 'D, d M Y H:i:s +0000' ); ?></lastBuildDate>
  16. <docs>http://backend.userland.com/rss092</docs>
  17. <language><?php bloginfo_rss( 'language' ); ?></language>
  18. <?php
  19. /**
  20. * Fires at the end of the RSS Feed Header.
  21. *
  22. * @since 2.0.0
  23. */
  24. do_action( 'rss_head' );
  25. ?>
  26. <?php
  27. while ( have_posts() ) :
  28. the_post();
  29. ?>
  30. <item>
  31. <title><?php the_title_rss(); ?></title>
  32. <description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
  33. <link><?php the_permalink_rss(); ?></link>
  34. <?php
  35. /**
  36. * Fires at the end of each RSS feed item.
  37. *
  38. * @since 2.0.0
  39. */
  40. do_action( 'rss_item' );
  41. ?>
  42. </item>
  43. <?php endwhile; ?>
  44. </channel>
  45. </rss>