feedburnertext-180x180

You 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.

01 <?php
02 //get cool feedburner count
04
05 //Initialize the Curl session
06 $ch = curl_init();
07
08 //Set curl to return the data instead of printing it to the browser.
09 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
10
11 //Set the URL
12 curl_setopt($ch, CURLOPT_URL, $whaturl);
13
14 //Execute the fetch
15 $data = curl_exec($ch);
16
17 //Close the connection
18 curl_close($ch);
19 $xml = new SimpleXMLElement($data);
20 $fb = $xml->feed->entry['circulation'];
21 echo $fb;
22 //end get cool feedburner count
23 ?>

You can surround it with the styling you like.

We found this tutorial on Balkhis. The original source 45n5 is no longer there. We have made it into a one step instead of a two step tutorial to make less clutter.

From http://www.wpbeginner.com/