Added by on June 14, 2012

feedburnerYou probably have seen blogs that are displaying FeedBurner Subscriber count as text instead of that annoying chicklet. The ability to display the subscriber count gives you a lot of control over styling and make the count work with your design. Therefore in this article we will share a way you can display FeedBurner subscriber count as text in WordPress.

First you would need to paste this code in the template file of your choice where you want to display the text for example sidebar.php. Be sure to change your FeedBurner ID. It is the name you have after the url so wpbeginner for our site.

<?php
//get cool feedburner count
$whaturl="http://api.feedburner.com/awareness/1.0/GetFeedData?uri=your feedburner id";

//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->feed->entry['circulation'];
echo $fb;
//end get cool feedburner count
?>

You can surround it with the styling you like.

Leave a Reply

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

*

4 Comments

  • My name 11 months ago

    My comment

  • buy xanax 11 months ago

    Nice blog, thanks for the info.

  • burberry shoes 10 months ago

    A remarkable share, I recently given this onto a colleague who had previously been performing a little evaluation during this. After which he actually bought me personally breakfast since i have discovered it with regard to him.. smile. Therefore let me edit that: Thnx for the treat! However yeah Thnkx with regard to spending whenever to go over this, I find myself highly relating to this as well as really like reading through regarding this topic. If at all possible, while you develop expertise, can you thoughts upgrading your website that has a lot additional information? It is extremely great for me personally. Huge thumb upward because of this short article!

  • oem software 8 months ago

    FiVv31 Really appreciate you sharing this blog article.Really looking forward to read more. Fantastic.