Permalink
Browse files

Update loop in rdf. Props Leffe. fixes #1542

git-svn-id: http://svn.automattic.com/wordpress/trunk@2860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent bec3e71 commit b96fd5e203b94ead17e3a1443e1c389cdebc1d15 ryan committed Sep 8, 2005
Showing with 5 additions and 5 deletions.
  1. +5 −5 wp-rdf.php
View
@@ -32,13 +32,13 @@
<?php do_action('rdf_header'); ?>
<items>
<rdf:Seq>
- <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
+ <?php while (have_posts()): the_post(); ?>
<rdf:li rdf:resource="<?php permalink_single_rss() ?>"/>
- <?php $wp_items[] = $row; $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
+ <?php endwhile; ?>
</rdf:Seq>
</items>
</channel>
-<?php if ($posts) { foreach ($posts as $post) { start_wp(); ?>
+<?php rewind_posts(); while (have_posts()): the_post(); ?>
<item rdf:about="<?php permalink_single_rss() ?>">
<title><?php the_title_rss() ?></title>
<link><?php permalink_single_rss() ?></link>
@@ -53,5 +53,5 @@
<?php endif; ?>
<?php do_action('rdf_item'); ?>
</item>
-<?php } } ?>
-</rdf:RDF>
+<?php endwhile; ?>
+</rdf:RDF>

0 comments on commit b96fd5e

Please sign in to comment.