Post Count

Posted in: Newspaper
Post count: 10

I have been running my site for about a year now and am in the process of migrating to Newspaper. I really like the “Post Count” feature display, but many of my posts have thousands or tens of thousands of views, and so I would like to update the numbers in the database to be accurate, rather than starting from zero on the first day I launch the redesigned site.

Where in the database is the post count field, is it editable, and are there any things to watch out for if I was to attempt to change this?

Thanks!
Greg

  • This topic was modified 10 years by gstern.
  • This topic was modified 10 years by gstern.
Post count: 23312

Hello gstern,

If you want to move the views of each post in our theme, you should find in your old source code, the file that contain this kind of variable which include each post_views_count and replace it with post_views_count from td_page_views.php. This is the function from Newspaper theme that counts each view post, like this: http://screencast.com/t/bd1wm4zsA

The other simple way is to change the number of posts views manually, like this: http://screencast.com/t/JdSUcUHo but it is with no sense if you have a lot of posts.

Hope this helps and let us know how it goes!

Thank you for the message!

Post count: 10

Thanks Catalin. I will have my developer give it a try!

Post count: 9

I don’t understand, which file containing post_count from old source to replace? Does you mean from previous Theme or what old source? And let’s presume that is what you talk, how is gonna work, that source code is not active and what if we had 5 themes before this one, i dont understand. What about if all our old Themes are Deleted after instaling NewsPaper 7? I really dont understand that ‘old source’ Doesn’t ajax counting option retrieve all info from server automatically when is enabled? Anyway, Can you just explain that ‘old source code’ little bit better?
Thanks in advance

Post count: 23312

Hello Filip86,

Through ‘old source code’ I have wanted to mean the code which you had from another theme in the past, not ours and which you have to adjust and implement them in our code source, do you understand me?

Thanks for your message!

Post count: 9

Yes, that is what i thought like i said, but again, does it mean if we have deleted our old themes after installing Newspaper 7 we are unable to retrieve all time count. For example, my old theme, (free version) don’t have count_views code and plus i also deleted it. I thought with activating Ajax Views Count, post views are retrieved from server, as it says in description: Enabling this feature will update the post view count using ajax on both pages and single post page. This feature is best used if you have a caching plugin active (yes i have from first day). On pages it will retrieve from the server the correct post view count. On single post page this feature will also increment the post view counter. Anyway, tnx for your support and help but i couldn’t make this work, i will just turn it off.
Thanks for your message!

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.