I am using this to filter all views instead of daily
function custom_wpp_update_postviews($postid) {
// Accuracy:
// 10 = 1 in 10 visits will update view count. (Recommended for high traffic sites.)
// 30 = 30% of visits. (Medium traffic websites.)
// 100 = Every visit. Creates many db write operations every request.
$accuracy = 100;
if ( function_exists('wpp_get_views') && (mt_rand(0,100) < $accuracy) ) {
// Remove or comment out lines that you won't be using!!
update_post_meta(
$postid,
'views_total',
wpp_get_views($postid, 'all', true)
);
}
}
add_action('wpp_post_update_views', 'custom_wpp_update_postviews');
and for the display
<?php
$args = array(
'post_type' => 'articles',
'offset' => 1,
'stats_views' => 1,
'limit' => 7,
'wpp_start' => '<ol class="wpp-list" start="2">',
'wpp_end' => '</ol>',
'meta_key' => 'views_total'
);
wpp_get_mostpopular($args);
?>
Please advise thanks Hector