• Resolved freemason

    (@freemason)


    Hi Héctor,

    I believe WP Popular Posts uses table wpdc_popularpostsdata to keep Total Views per post, since it was posted. How can I diplay this information?

    Sorry, this may be a silly question, but I couldnt find a way to do it:

    Regards
    A Jorge

Viewing 1 replies (of 1 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @freemason,

    Yes, that’s correct.

    To display the total views count:

    • You can try using the wpp_get_views() function to get the views count of your post/page (eg. <?php echo wpp_get_views(get_the_ID(), 'all'); ?>).
    • You can try using this shortcode which would let you display your views count anywhere on your post or page (you’d need to change it a bit to have it return total views, like the example above).
    • You can add this code snippet to your theme’s functions.php file (or to a site-specific snippets plugin) so the views count is automatically added to the top of your posts/pages (you may need to change it a bit if you only need it to display total views count).

    If you have any questions don’t hesitate to ask.

    • This reply was modified 2 years ago by Hector Cabrera. Reason: Reworded for clarity
Viewing 1 replies (of 1 total)
  • The topic ‘Display Total Views per post’ is closed to new replies.