Location of the hit counter variable setting

Posted in: Newsmag
Post count: 9544

Hi folks! ๐Ÿ™‚
I’m baaaack. Getting ready to migrate our news sites to the ‘modern’ version of NewsMag vs the ‘old’ mid-cycle version from couple years ago.

One thing we used to have to tweak in one of the old config files was the variable name for hit counter, which I think you had as ‘reads’ or ‘view’ — and we need to change that to pre-existing field ‘views’ since our sites pre-date TagDiv so that our ‘eyeballs’ line up and don’t reset to zero. ๐Ÿ™‚

If you can let me know where to edit that variable in the files for current version as of Dec. 2020, would be super helpful.

Thanks! ๐Ÿ™‚ ((no rush))

happy holidays!

Chris

Post count: 35449

Hi simchris, hope to be able to provide the answerer for this question soon, I ask a teammate that is older then my and knowhow was Newsmag theme before tagdiv Composer.
Thank you for your understating!

Post count: 35449

Hi simchris, now the view of posts are stored in database, also I think that the code for this is set in td_page_views.php on this path wp-content/plugins/td-composer/legacy/common/wp_booster/td_page_views.php but before to make any changes or updates, pleas make a full backup to your website and database.
Hope this will help you!

Post count: 9544

Ha. Doh. Not as smart as I think I am. Totally blanked on looking in the plugin folder for that, as used to be part of the core booster files in early days of that (I was a beta for the booster plugin; and have not used bakery in years and years).

YES!! This was the value (based on the classic decade old WP-PostViews plugin we’ve used for over 10 years now as the original plugin for this):

static $post_view_counter_key = ‘post_views_count’;

static $post_view_counter_key = ‘views’;

Anyway, THAT was the hook I needed – thanks. ๐Ÿ™‚

Chris ๐Ÿ™‚

HAPPY HOLIDAYS!

Post count: 35449

Hi, thank you for staying with us for all this time!
We are always happy to help with anything we can!
Take care of you!
Happy Holidays!

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.