Count viewer afterr update no work
-
Hello Hector
I hope you are doing well and in good health
After yesterday’s update
I have a little problem
I think this concerns the wpp_get_views () tag
I have a shorcode to display on each post the number of views
like the link for exampleSince the update …. it only takes the views I think of 24 hours and not all
https://github.com/cabrerahector/wordpress-popular-posts/wiki/2.-Template-tags
here I read
Time range (string / array, optional). If time range isn’t provided, wpp_get_views () will retrieve the total amount of views.
is this a problem with my function or with the update?
Thank youfunction wpp_viewcounter ($option) { if (function_exists("wpp_get_views") ) { $nbView = wpp_get_views(get_the_ID()); $iNbView = intval(preg_replace("/[^0-9]/","",$nbView)); echo colorCounterView($iNbView); } } add_shortcode('wpp_counter_view', 'wpp_viewcounter'); function colorCounterView($number) { $counterColorBegin=""; $counterColorEnd=""; $num= intval(preg_replace("/[^0-9]/","",$number)); if ($num >100) { $counterImportant = ""; if ($num >100) {$counterImportant = '-normal';} if ($num >300) {$counterImportant = '-good';} if ($num >500) {$counterImportant = '-verygood';} if ($num >1000) {$counterImportant = '-important';} if ($num >2000) {$counterImportant = '-veryimportant';} $counterColorBegin='<span class="eye-counter-color'.$counterImportant.'">'; $counterColorEnd='</span>'; } else { if (strlen($number)> 4) { $counterImportant = '-veryimportant'; $counterColorBegin='<span class="eye-counter-color'.$counterImportant.'">'; $counterColorEnd='</span>'; } } return $counterColorBegin . $number . $counterColorEnd; }
The page I need help with: [log in to see the link]
Viewing 14 replies - 1 through 14 (of 14 total)
Viewing 14 replies - 1 through 14 (of 14 total)
- The topic ‘Count viewer afterr update no work’ is closed to new replies.