Using SimplePie For Your Sideblog

I’ve previously talked about sideblogs, or asides as they’re often called. The most common way to setup a sideblog in WordPress generally involves creating a second Loop to display posts from a certain category (a plugin is often used to do this). There’s a downside to that approach though.

If you use the Loop/Category approach, you end up with tons of short, two-sentence posts. That means each of your 347 sideblog entries has it’s own permalink page where 97% of the page is just the single.php template. Google doesn’t really like pages with little “original content,” so you could potentially have a problem on your hands. Even if you’re not that worried about what Google thinks of your blog, you still have 347 permalink pages, which could get in the way.

Here’s my solution:

  1. Create a new Tumbleblog using Tumblr.com.
  2. Use the SimplePie WordPress Plugin to easily put the Tumbleblog feed’s contents in your blog sidebar.

Simple (pun unintended). Now you can post your sideblog entries to Tumblr, and they will appear on your blog.

The SimplePie plugin has a directory full of templates that decide how your sideblog feed is displayed. The included templates don’t work well for a sideblog, so I’m including my custom template as well as the function call required to display the sideblog.

Sideblog SimplePie Template:

{ITEM_LOOP_BEGIN}
<li>
<strong><a href="{ITEM_PERMALINK}">{ITEM_TITLE}</a></strong> <small><i>{ITEM_DATE}</i></small><br/>
{ITEM_DESCRIPTION}
</li>
{ITEM_LOOP_END}

Copy/paste the template into your favorite text editor and save it as “sideblog.tmpl.” Upload it to www.yourblog.com/wp-content/plugins/simplepie_plugin/templates/. Now that you have the plugin installed and the template updated, paste this code into your blog template where you want the sideblog to appear:

<ul>
<?php
echo SimplePieWP('http://feeds.feedburner.com/wsc-sideblog', array(
'items' => 5,
'cache_duration' => 900,
'date_format' => 'n/j/Y g:i A',
'template' => 'sideblog'
));
?>
</ul>

And your done!

  • http://www.kristarella.com kristarella

    Nice solution! I like Tumblr because it’s so easy to post to, hope you find it good to use.

  • http://www.webmaster-source.com Matt

    I like Tumblr too, though they’ve been having some rough spots lately. Normally I’m not a huge fan of Tumbleblogs, but they have their purposes.

  • http://simplepie.org Ryan Parman

    Hey, would you mind if I included this sideblog template in version 2.2 of the plugin?

  • http://www.webmaster-source.com Matt

    No problem. It would probably benefit more people that way.

  • http://www.associatedknowledge.com Dave S.

    Hey Matt, I do have a question for you related to your post. It seems like you head down a very specific path by suggesting Tumblr / tumbleblog and then using SImplePie. Is this what you ended up using here or did you opt for a different method? It looks like you did, but I can’t be sure and I like your implementation.

  • http://www.webmaster-source.com Matt

    I just used Tumblr as an example. You can use whatever RSS-capable service you want. If you meant to use a sideblog exclusively as links, you could use the feed for one of your Del.icio.us tags even.

    Yes, I started-out using Tumblr for my sideblog, but I ended-up switching to a different method later on. Back when I used Tumblr and SimplePie for my sideblog, it did look fairly similar.

  • http://www.associatedknowledge.com Dave S.

    Matt,

    Thanks. That all makes sense. I just wanted to be sure that I was really exploring all options before making my decision on which path to follow.

    Dave

  • Pingback: Why should your blog needs a SideBlog ? | FeatherPot

  • Pingback: עולם הפידים- rss » ITbananas

  • Pingback: weather » Blog Archive » lifestream for 2008-10-28