Home / Tutorials / How to Display RSS Counter in WordPress blog

How to Display RSS Counter in WordPress blog

/
/
364 Views

Are you boring with those RSS chicklets, I have seen those on many websites and they looks ugly, no matter how you change its color to make it beautiful but it remains ugly.

Here today I will show you Display RSS Counter in WordPress blog, you can use it your own way, display it anywhere you want in your WordPress blog. You can style it and make it beautiful.

Don’t forget to Subscribe to Email Newsletter, Follow us on Twitter and Like us on Facebook – for recent updates.
Create a new text file and save it in php format and name it feed and then paste the following code in the file and save it. So it will be feed.php
[php]<?php
//get cool feedburner count
$whaturl="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=<strong>Feed Here</strong>";

//Initialize the Curl session
$ch = curl_init();

//Set curl to return the data instead of printing it to the browser.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

//Set the URL
curl_setopt($ch, CURLOPT_URL, $whaturl);

//Execute the fetch
$data = curl_exec($ch);

//Close the connection
curl_close($ch);
$xml = new SimpleXMLElement($data);
$fb = $xml-&gt;feed-&gt;entry[‘circulation’];
//end get cool feedburner count

echo $fb;

?&gt;[/php]

After pasting these lines to your file we have to add Feedburner user name, so replace the Feed Here with your Feedburner user name on the following line

[php]//get cool feedburner count
$whaturl="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=<strong>Feed Here</strong>";
[/php]

Then simply add this line of code wher­ever you want the counter to dis­play:

[php]&lt;?php include("feed.php"); ?&gt;[/php]

Save your feed.php file to your theme files where you have hosted the blog.

Don’t forget to Subscribe to Email Newsletter, Follow us on Twitter and Like us on Facebook – for recent updates.

Subscribe to our Newsletter

If you liked this article, then please subscribe to our newsletter for latest web resources. You can also find us on Twitter and Facebook.

Leave a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Blog For All The Latest & Greatest Freebies!

Following our blog is a great way to make sure that you are up to date on the latest and greatest Freebies and WordPress news.

We don't spam and your information will never be shared.

Subscribe To Our Blog For All The Latest & Greatest Freebies!

Following our blog is a great way to make sure that you are up to date on the latest and greatest Freebies and WordPress news.

We don't spam and your information will never be shared.