Hello @stanxxx
Thanks for the question – the plugin uses VARCHAR instead of INT because VARCHAR supports all object, not just post and page. It we enables developers to get total views of any object.
I will change the status of this issue to resolved.
Thank you
Steve
Understood! By the way I have a question, we track currently only posts, but would like to add a counter on the index page. Tried with a custom code, no way to make it work, probably we put it in a wrong place. We tried into a widget on the homepage, nothing. Where should it be placed?
I will anyway come back to you for the described problem, and thank you very much for your reply by mail too!
Hello @stanxxx
You can use the PVC PHP tags to add the counter.
Example, to update counter of an object with key is ‘my-index-1’
<?php pvc_stats_update( 'my-index-1', 0 ); ?>
And use this PHP code to show counter of an object
<?php pvc_stats( 'my-index-1', 1 ); ?>
Hope that helps.
Steve