You in all probability have seen blogs which can be displaying FeedBurner Subscriber rely as textual content as a substitute of that annoying chicklet. The potential to show the subscriber rely provides you loads of management over styling and make the rely work along with your design. Therefore in this text we are going to share a manner you may show FeedBurner subscriber rely as textual content in WordPress.
First you would wish to stick this code in the template file of your alternative the place you wish to show the textual content for instance sidebar.php. Be certain to alter your FeedBurner ID. It is the title you will have after the url so wpbeginner for our website.
<?php //get cool feedburner rely $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 information as a substitute of printing it to the browser. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set the URL curl_setopt($ch, CURLOPT_URL, $whaturl); //Execute the fetch $knowledge = curl_exec($ch); //Close the connection curl_close($ch); $xml = new SimpleXMLElement($knowledge); $fb = $xml->feed->entry['circulation']; echo $fb; //finish get cool feedburner rely ?>
You can encompass it with the styling you want.
We discovered this tutorial on Balkhis. The unique supply 45n5 is not there. We have made it right into a one step as a substitute of a two step tutorial to make much less muddle.