Hi ,
I’m using a plugin called Post Pay Counter to record in table format the number of post views per author.
In order to set it up I need to find out if the post visit counter (post views) is postmeta or callback.
If it’s postmeta I need to know the postmeta holding the visits.
If it’s callback I need to know classname, methodname
Can you please advise?
Hi,
The view count is a post meta.
If you want to use the view counter for your plugin, you can check the code in these files: -> wp-content/plugins/td-composer/legacy/common/wp_booster/td_wp_booster_functions.php -> https://i.imgur.com/bdmzajg.png
-> wp-content/plugins/td-composer/legacy/common/wp_booster/td_page_views.php -> https://i.imgur.com/Ah9v3Co.png
Hope this will help you!
Thank you!
Hi,
In our standard templates, the view si call like this <?php echo $td_mod_single->get_views();?> -> https://i.imgur.com/OV1PZEk.png
Hope this will help you!
Thank you!
Hi Calin,
Unfortunately not. I contacted the plugin’s creator and this is what he said:
I asked the advice of the theme support people if <?php echo $td_mod_single->get_views();?> as the post meta in the box they provided under options was correct.
They replied…….
“No, it is not formatted correctly. You need to provide a valid callback: either a standalone function (like get_view()) or a static method in a class. Note that, anyway, the function should take in a post ID to work fine with Post Pay Counter”.
Can you advise me further in view of the plugin creator’s comments?
Thanks
Hi,
Please notice that we did not tested the Post Pay Counter plugin with our theme and therefore, we cannot say for sure if it will work or not as expected with the theme, also, we do not know the behavior of this plugin or how it should integrate to work, sorry! Also, we cannot provide support for untested plugins.
Thank you!
Hi,
Please notice that we did not tested the Post Pay Counter plugin with our theme and therefore, we cannot say for sure if it will work or not as expected with the theme, also, we do not know the behavior of this plugin or how it should integrate to work, sorry! Also, we cannot provide support for untested plugins.
Thank you!
Good Day Findlay
Please could you advise if you managed to find the correct setting for this as i am also using the pluging and need the correct settings.
Regards
-
This reply was modified 5 years by
martinbrandow. Reason: Wrong person i was refering to
I am also using the Post Pay Plugin and have a problem setting the post meta.
Hi Calin, it is not about testing but just providing your end on which Post meta holds the views count since Newspaper counts visits and creates a field on the posts page where we see visits.
By providing this info, the Postpay Plugin will use that post meta and use NewsPaper visits.
Update:
I see Lucian provided a solution here https://forum.tagdiv.com/topic/post-views-meta-data/
I don’t know if it is the same since that was over seven years ago.