Home / functions.php / Plain text feedBurner subscribers
  • How to Plain text feedBurner subscribers


    Adding the first block of PHP code to the functions.php of your wordpress theme. The next block of code at to your theme in the location you wish to display your feedburner count, you must also make sure you have the “awareness api” active in your feedburner account.

    ( click code to copy )

    wordpress snippet : PHP - functions.php

    function rssCount(){
    	$feedId = 'feedburner_id';
    	$contents = file_get_contents("https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=$feedId");
    	$pattern= "/(?<=circulation=['|\"])[^'|\"]*?(?=['|\"])/i";
    	preg_match($pattern, $contents, $thePath);
    	return $thePath[0];
    ( click code to copy )

    wordpress snippet : PHP - theme

          echo rssCount();

    ( WordPress codex functions, hooks, in this snippet. )