0

I am trying to add a "load more" RSS feed button functionality to my site. I am currently pulling in blog posts from my WP blog site into my main site with Simplepie. It works great and I have set the $max_items to 3 but I can't seem to find any tutorial or documentation on how to add a "load more" button with Simplepie.

I've been searching around the internet and the Simplepie documentation, but I still am not able to find anything on this matter.

Can someone please help me or point me towards a tutorial for this?

Much Thanks!

1 Answers1

1

The "Load More" feature is kinda a part of the News Blocks Demo 2.0. Many RSS feeds only provide a limited number of posts or only consider chronologically recent posts. I don't think there is anything in the standard where you can just say "give me more". The way News Blocks works is it fetches as many posts as it can, then only displays the first X, when you click "more" it displays the rest. Good luck.

Muskie
  • 577
  • 3
  • 21
  • Hey Muskie, thanks so much for pointing me towards the right direction. Basically I have 3 posts showing chronologically with the most recent one first. I'd like the "more" button to load older posts. So basically News Blocks would load, 10 posts but only show the first 'X' and then loads the older ones when I click "more", correct? – user1050321 Apr 27 '12 at 14:59
  • Yep, when you fetch an RSS feed with SimplePie or any news reader you get the data the publisher provides. News Blocks 2.0 displays the first 'X' items and when you click the "more" button it shows the rest. The demo works and I got the code working on my site too. The gziping of css and javascript along with the latest versions of PHP depreciating functions used in SimplePie/News Blocks are issues to watch out for, but they can be overcome with Googling. ;-) – Muskie Apr 27 '12 at 16:51
  • Muskie, thanks again so much for info. But can you elaborate a little more about "The gziping of css and javascript along with the latest versions of PHP depreciating functions used in SimplePie/News Blocks are issues to watch out for"? I don't understand, why would I be gzipping the css and js along with the latest PHP deprecating functions? – user1050321 May 01 '12 at 13:52
  • This was probably in reference to the News Block 2 demo. It uses gzip and other tricks to try and speed it up. But just getting the code up and running is made more difficult if gzip and mod_rewrite aren't enabled correctly on whatever server you're trying to deploy on. Just forget about it, I ramble too much. – Muskie Jul 09 '12 at 17:53