*Please pardon the un-styled mess why I am rethinking and re-designing my blog!*

The Design O'Blog

Quick Tip #16 Super Simple Pie!

The estimated time to read this article is 2 minutes

Another Quick Tip! Yay! Last night I discovered how easy it is to  add snippets of blog posts to other non wordpress pages (check out my homepage) with Simplepie and I thought I would show you guys how! Leave a comment and let me know what you guys think or if you have any questions!

Click read more to get the code snippets and see simple pie in action!

Download Simple Pie: http://simplepie.org/

Installing Simple Pie: http://simplepie.org/wiki/setup/setup

Code that goes at the top of your page:

[]
< ?php

// This shows where simple pie is located simplepie.inc.
require_once(‘php/simplepie.inc’);

// Your Feed Address
$feed = new SimplePie(‘http://feeds2.feedburner.com/designoblog’);

$feed->handle_content_type();

?>

[/]

And the code to throw in where you want the blog posts to show up:

[ language="php"]

< ?php foreach ($feed->get_items() as $item): ?>

Subscribe to Quick Tips in Itunes

[16] Comments
Posted in design, Screencasts, Tutorials, Web 2.OH, Web Design

Share This Article

Share! Share On Twitter

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

16 Responses to “Quick Tip #16 Super Simple Pie!”

  1. Gabe says:

    Nice tip! Stumbled for ya.


  2. very cool!


  3. Nice tip, I didn’t know about SimplePie!


  4. Sweet! Glad you found it so easy. :)


  5. Great tip Niki. This is one that I suspect I’ll use a lot.

    Keep up the great work!


  6. Nice tip. I’ll give it a try.


  7. Cool. Do you know of a way to limit the feed to only the latest 2-3 posts?


  8. hi, I’m just wondering if simplepie is able to display rss with image. i’ve been pulling my hair all day try to make it work. thank you for the help :)


  9. Hello
    Could you please show, how to shorten titles and discriptions, too?

    For example:
    I only want to show the last 3 entries.
    With titles not longer than 150 Caracter
    And 250 Caracters for the Entries

    Thank you.


  10. Hey Niki, I actually achieved this by a different method recently coz i wanted to display my latests posts on my portfolio which is a non-wordpress site. I was able to do it using this great tut! http://www.corvidworks.com/articles/wordpress-content-on-other-pages

    :)


  11. Very, very useful little vid! Perfect to get one quickly rolling, especially after screwing around with other RSS parsers that weren’t near as user friendly for days. Feeling a lot better about getting my own clients into RSS in a solid way. Thanks Nikki.


  12. Hey thanks for the help!!, with this tute and a couple of others i managed to get a truncated feed from wordpress into a spry accordion on my homepage, here is the result http://www.passionfruitdesign.com.au


  13. Hi Nikki, thanks for the cool tutorial. I see the feed on your homepage pulls in the images from the article too, can you explain how you did that in simplepie?

    Thanks!




Trackbacks & Pingbacks:

  1. Pingback from SimplePie: Weblog » New SimplePie Screencasts

    [...] Quick Tip: Super SimplePie! — Niki Brown quickly shows you how to drop RSS content into an existing page. [...]

  2. Pingback from A Collection of Beginner Simplepie Tutorials

    [...] Niki shows how she added a RSS to her home page. Quick Tip #16 : Super Simplepie [...]

  3. Pingback from 14 Tutorials to Get You into SimplePie - The Designed

    [...] Super Simple Pie! – Niki [...]