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.
09 | curl_setopt( $ch , CURLOPT_RETURNTRANSFER, 1); |
12 | curl_setopt( $ch , CURLOPT_URL, $whaturl ); |
15 | $data = curl_exec( $ch ); |
19 | $xml = new SimpleXMLElement( $data ); |
20 | $fb = $xml ->feed->entry[ 'circulation' ]; |
You can surround it with the styling you like.