In this tutorial I will show you how to start integrating your Wordpress blog into your Pligg install by displaying your recent blog posts in your Pligg sidebar.
One way to add to your Pligg install is to add a Wordpress blog. The blog can be used for promoting certain site features, posting top 10 lists or posting site news. A blog is a great way to increase your site’s traffic and exposure.


I added a Wordpress blog to FAQPAL a couple of months ago and it has certainly helped.
One way to integrate the blog is to display your recent blog posts in the Pligg sidebar, this will again add to your blog traffic and ultimately your Pligg install traffic.
In order to do this, you will need to download the latest version of Simplepie, once downloaded, unzip it, and upload it to your 3rdparty folder. It will take approximately 5 minutes to upload, as it is a huge folder.
![]()
Now in order to make this work, you must choose a .php file to add the following code, I have used sidebar_stories_u.php (using v9.9.5) and added it to the bottom.
In Wistie open libs/sidebarstories.php, add to the bottom:
$feed_url = ‘http://www.YOURSITE.com/blog/feed/’;
$max_items = 5;
//Load SimplePie
include ‘http://www.YOURSITE.com/3rdparty/simplepie/includes/simplepie.inc’;
//Fetch the RSS feed
$feed = new SimplePie($feed_url);
//Check for errors
if ($feed->error())
echo ‘Error : ‘,$feed->error();
//Output up to $max_items posts
foreach ($feed->get_items(0, $max_items) as $item): ?>
<div class="item">
<h3 class="title"><a href="<?php echo $item->get_permalink(); ?>">< ?php echo $item->get_title(); ?></a></h3>
< ?php echo $item->get_description(); ?>
<p><small>
Posted < ?php if ($author = $item->get_author()){ echo ‘ by ‘.$author->get_name(); }?>
on < ?php echo $item->get_date(‘j F Y | g:i a’); ?>
</small></p>
</div>
< ?php
endforeach;
?>
In the above code, make sure you change the domain to match yours, as well make sure the path to your blog is correct.
The code above will display “5″ of your recent entries, which you can change by altering:
$max_items = 5;
it will also display the excerpt for the each blog post, author name and date. I chose to only display the title, so you can remove the following:
<p><small>
Posted < ?php if ($author = $item->get_author()){ echo ‘ by ‘.$author->get_name(); }?>
on < ?php echo $item->get_date(‘j F Y | g:i a’); ?>
</small></p>
That’s it. This module will work on both v9.9.5 and the latest Pligg build. You will need to do whatever styling you want in order to blend it in with the rest of your site.
You can see a working example on FAQPAL, check out the blog as well.
As always, any issues leave me a comment below.
Will you be using this on your Pligg install?






