After upgrading to 3.5 there was a problem with the posts view on the main page for BLOCK 2. Values increased by hundreds of times and became the same for all records. See https://redpen.io/m876ky
If go back to the previous version are all displayed correctly https://redpen.io/38pfxc
hi,
do you have the plugin Wp-postview installed?
please disable this plugin. here the documentation page on this plugin: https://forum.tagdiv.com/wp-postviews-post-view-counter-alternative-for-w3-total-cache/
Thanks for you message.
Radu A.
Hi.
I have WP-PostViews + W3 Total Cache. If i disable WP-PostViews, i lost all statistics.
Maybe you did not understand me, when i upgrade to 3.5 problem occurs with only one block 2 on the main page. For example, if you upgrade to the counter in the block shown for each of the three records 100, 75, 90, then after the update immediately see 4500, 4500, 4500. I disabled W3 Total cache, deleted a сache folder, the problem remained.
it’s http://art-post.me – the views on homepage is the same, but when you click on any post, the counters display what they are supposed to (with cache plugin or without any). If you could help, that would be great.
Hi,
The theme have the default counter and also support that plugin WP-PostViews that works with cache plugin.
If you have installed that plugin the theme will read the count from that plugin.
If you edit a post you will have 2 custom fields that keep the views(1 is the default one and another one is from that plugin WP-PostViews)
http://screencast.com/t/NFWjdEqkKM
You can easily check you counter, go to a post, make refresh and see if the counter work, should update on each refresh.
Hi there,
I had the same problem. It’s due to the fact that the the_views function in wp-postviews.php reads the value of the “views” custom field from the homepage instead of the single posts mentioned in the blocks, so all counters on the homepage show the same value.
I fixed this commenting out
//$post_views = the_views(false); in td_module.php
and adding
$post_views = get_post_meta( $this->post->ID, 'views', true );
which reads the value of the views custom field of each single post. It seems to be working so far… but be careful, it has some implications, as it overrides the the_views function.
Hi,
You mean here: http://screencast.com/t/w9Xx8C1qVipi We will take a look.
Thanks for the message!
Yeah like that, if I recall correctly the numbers were shown with a dot seperator and a customizable text like “views” or “times viewed” behind it. The text doesn’t show up anymore with this fix. So on post pages it only shows the number without the text “views”.
@r1kay, sorry for the late reply, I was out of town on vacation and couldn’t check the code. Here’s a quick fix, which still overrides the the_views function of wp-postviews, but fixes the issue with the thousand’s dot not showing and the text “views” not showing:
on line 153, where it says
$buffy .= $post_views;
change this with
$buffy .= number_format_i18n($post_views).' addwordhere';
this will change the format of $post_views created on line 152 and concatenate that with a word of your choice (change addwordhere with whatever you like, but make sure to leave a blank before the word).
Make sure you also make the original modification to line 152 I mentioned in my previous reply (https://forum.tagdiv.com/topic/posts-view-in-v-3-5/#post-10902).
This is not the best solution… It seems to work fine, but it would be better to change the “the_views” function in wp-postviews instead, or call its settings from here so you woudln’t have to concatenate manually the text “views”… in the meantime I hope it works, let me know (it works on my site).
Cheers!
-
This reply was modified 12 years by
PhilDbz. Reason: wrong line number, corrected