Is possible that I can display the total page views for my blog using Statpress? I know I can use %totalvisit%, as well as others, but not total page views. Has anybody done it? Thanks.
Edit the statpress.php in wp-statpress plugin directory. Go to line 1294, which display this code function iri_StatPress_Vars($body) { global $wpdb; $table_name = $wpdb->prefix . "statpress"; if(strpos(strtolower($body),"%visits%") !== FALSE) { $qry = $wpdb->get_results("SELECT count(DISTINCT(ip)) as pageview FROM $table_name WHERE date = '".gmdate("Ymd",current_time('timestamp'))."' and spider='' and feed='';"); $body = str_replace("%visits%", $qry[0]->pageview, $body); } Code (markup): Add this code: if(strpos(strtolower($body),"%totalpageviews%") !== FALSE) { $qry = $wpdb->get_results("SELECT count(id) as pageview FROM $table_name WHERE spider='' and feed='';"); $body = str_replace("%totalpageviews%", $qry[0]->pageview, $body); } Code (markup): Then use %totalpageviews% as usual.