2

Add Dynamic RSS Feeds with SBPM

Have you ever wanted to add some great dynamic links to top news stories, recent blog posts from relevant sites or twitter RSS data to your posts?

With SPBM, this become very easy!

You will need to have a plugin such as the brilliant Exec-PHP installed to get this working, but you can enter the code into your SBPM content and list RSS data for your keywords:

Latest %%keyword%% Blog Posts
<?php
include_once(ABSPATH.WPINC.'/rss.php');
$feed = "http://blogsearch.google.com/blogsearch_feeds?q=%%keyword%%&hl=en&output=rss";
echo wp_rss($feed, 5);
?>

This produces a list of the 5 latest blog posts from the blogsearch.google.com page for your keyword.

All you need to do is find the RSS feed you want to show, copy and paste it in place of the “http://blogsearch.google.com/blogsearch_feeds?q=%%keyword%%&hl=en&output=rss” I have shown above. Then, change any search keywords to %%keyword%% and you are good to go!

You could also produce a list of the latest news stories from news.google.com too if you wanted:

%%keyword%% News
<?php
include_once(ABSPATH.WPINC.'/rss.php');
$feed = "http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&q=%%keyword%%&cf=all&output=rss";
echo wp_rss($feed, 5);
?>

RSS feeds are everywhere, so take advantage of them and put them to use in your SBPM content!

Click Here to Leave a Comment Below 2 comments
Emanuel - December 15, 2011

Hi I just bought your plugin,
I want to include rss feeds on my post but the explanation above was a bit hard to understand. Can you please explain it step by step? Thank you!.

Reply
    Tao - December 15, 2011

    Hi Emanuel.

    1. You will need to download and activate a PHP plugin for WordPress such as Exec-PHP.
    2. In the SBPM content, enter the PHP code from the post above, in the area where you want the feed information to appear.
    3. Save the SBPM settings.
    4. Make posts and then it should all be working!

    Reply

Leave a Reply: