diff --git a/pico_rss/pico_rss.php b/pico_rss/pico_rss.php
index ff2b05a..5440831 100644
--- a/pico_rss/pico_rss.php
+++ b/pico_rss/pico_rss.php
@@ -28,7 +28,7 @@ public function request_url(&$url)
public function get_pages(&$pages, &$current_page, &$prev_page, &$next_page)
{
// Limit feed to latest 10 posts
- if($this->is_feed) $pages = array_slice($pages, 0, 10);
+ if($this->is_feed) $pages = array_slice(array_reverse(array_filter($pages, function($p) {return $p['date'];})), 0, 10);
}
public function before_render(&$twig_vars, &$twig)
@@ -45,4 +45,4 @@ public function before_render(&$twig_vars, &$twig)
}
-?>
\ No newline at end of file
+?>
diff --git a/pico_rss/rss.html b/pico_rss/rss.html
index e255324..6b6db8e 100644
--- a/pico_rss/rss.html
+++ b/pico_rss/rss.html
@@ -6,7 +6,6 @@
RSS feed for {{ site_title }}
{% for page in pages %}
- {% if page.date %}
-
{{ page.title }}
@@ -14,7 +13,6 @@
{{ page.date|date("D, d M Y H:i:s O") }}
{{ page.url }}
- {% endif %}
{% endfor %}
-
\ No newline at end of file
+