Display feedburner subscriber count In WordPress blog

Categories: Web design, Wordpress -

If you want to display the number of subscribers you have but don’t want to use Feedburner’s button, here is how to display it as text in your WordPress theme. Replace FatherApprentice (in bold) with your feed name.


// this is all PHP code
// Grab Feedburners
$username = 'FatherApprentice'; /* feedburner feed name */
$api_page = 'https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=' . $username;
$xml = file_get_contents ( $api_page );
$profile = new SimpleXmlElement( $xml, LIBXML_NOCDATA );
$rsscount = ( string ) $profile->feed->entry['circulation'];
$data['rss'] = $rsscount;
echo 'RSS subscriber:' . $data['rss'];
mirkohumbert

Comments

No comments yet.

Write a comment

You must be logged in to write a comment.

« »