Hello!
Recently I’ve noticed that the post views function of this theme doesn’t work at all! For instance, one of my posts has 4,390 views (on Jetpack stats), but on the front-end or post it is showing something about 400! I’ve contacted tagDiv quiet a few times, but none replied. Hope they fix that ASAP. Does anyone here know, how can I fix that?
Thanks!
Mehedi
My site’s been online for a while and now that I am on newspaper, the post views only display the number of views after I switched to the theme. I’d like to be able to display all views from the moment a post is published (even though it might’ve been on a different theme).
After I saw Christopher’s reply, I disabled jetpack but the number of views in the counter hasn’t changed. Am I missing something?
HI
fyi, the theme installs a meta field for post views and starts counting once the story is viewed once theme is installed. There is no way for this new data field to count OLD reads from existing content, such as a year ago as the meta field didn’t exist.
On our sites we were using a very old and respected “view counter” and this used the meta field of “views” — so each update we actually have to hack the theme file to change the theme meta field to use our existing views data field.
If you have an existing view counter meta field, you can switch to use that existing field which was counting reads/views (or ‘hits’ as some might call them erroneously).
If no tracking meta field existed in the past – there is no way for the theme to “read” that field to display the number of reads “in the past.”
MORE SPECIFICALLY HOWEVER:
since I don’t use jetpack, and if all your views are stored in jetpack, then obviously the connector needs to ping that datafield stored “in the cloud” on Automattic’s servers where that data lives. But, check your meta (custom fields, if you prefer) for an older post. If there is a data field showing 4,000 reads for that post in your local dbase then all you’d need to do is change the hit counter module to use that existing data field by name and NOT use the one created by the theme.
Ideally – it would be wonderful to have an option to “use existing hit counter data field” option in the admin panel, particularly for a “newspaper” theme where this might be tracked more seriously that a parakeet blog. Or, a custom config file to specify that sort of thing vs hacking the theme each time.
custom-config.php
> use custom read counter field
> turn off hit counter on indexes and home page
> turn on author byline on home page and indexes
> turn on author byline on posts (should be default “on”)
(etc)
And,
I should point out that I’m just now moving to v3 from v2,
and at the moment cannot locate WHERE to change the call to the custom data field for the view counter. (d’oh).
MARIUS/RADU’S:
Could your point me at the location of the correct file to change the views ‘counter’ field to “views” from the default field?
Thanks!
Marius, et al
Can you add an additional help/tutorial to this page in the documentation:
https://forum.tagdiv.com/using-the-theme-with-existing-content/
Working with an existing post view/counter:
Change data field name to existing custom field.
(how to)
THanks!
hi
http://screencast.com/t/lKe0zHmF
about the documentation page for using-the-theme-with-existing-content/ :
we are using get_post_meta() function, so what ever custom field one is using, it
will have to be a field in the wp_postmeta table : http://screencast.com/t/2ajCAtV0hrSE
you cannot have your custom field in a custom table, it will not work :
Thanks for you message.
Radu A.
Thanks, Radu
looks like I didn’t scroll down far enough in the wp_booster folder 😉
thanks… this works for me in v3, as it did in v2
changing
static $post_view_counter_key = 'post_views_count';
to
static $post_view_counter_key = 'views';
awesome! 🙂
THis would be something good to add to tutorial page, since this will be a common issue for folks migrating from existing theme where a wp_meta (custom field) has been already created with post views tracking, either by a theme or a plugin.
THANKS!!