Views count disappears
-
Hi,
I noticed views count disappeared. I test the views number in order to display it only if post has at least 200 views.
I compared with your previous release and may found the bug.
It’s located in wordpress-popular-posts.php inside
wpp_get_viewsfunction.
If there is a result you return it withreturn number_format( $result[0]['pageviews'] );The problem is (in France mostly) the number returned will be comma separated.
So for example, the number 27000 will be returned as 27,000 with your function.
So the view count disappears because I test a wrong number. In my example I’ll test 27 instead of 27000.Could you please fix this by update your code with
return (int)$result[0]['pageviews'];Thanks in advance.
The topic ‘Views count disappears’ is closed to new replies.