// get the page view counters and display on the page function appthemes_get_stats($post_id) { global $posts, $app_abbr; $daily_views = get_post_meta($post_id, $app_abbr.'_daily_count', true); $total_views = get_post_meta($post_id, $app_abbr.'_total_count', true); if(!empty($total_views) && (!empty($daily_views))) echo number_format($total_views) . ' ' . __('total views', 'appthemes'). ', ' . number_format($daily_views) . ' ' . __('today', 'appthemes'); else echo __('no views yet', 'appthemes'); }
// get the page view counters and display on the page function appthemes_get_stats($post_id) { global $posts, $app_abbr; $daily_views = get_post_meta($post_id, $app_abbr.'_daily_count', true); $total_views = get_post_meta($post_id, $app_abbr.'_total_count', true); if(!empty($total_views) && (!empty($daily_views))) echo number_format($total_views); else echo __('no views yet', 'appthemes'); }
There are currently 1 users browsing this thread. (0 members and 1 guests)