WP Super Cache
Dynamic Cached WP-PostViews (3 posts)

  1. Satiro
    Posted 3 years ago #

    I'm using WP-PostViews to show the number of views for each post on the homepage. I tried to make this number stays dynamic in this way:

    <!--mfunc the_views() -->
    <?php the_views() ?>

    But when I do a visit on a post and reload the homepage, it shows the same number (in the database the post's views increased by one). However the right number is showed on the post page and it doesn't have the code I wrote above. I'm using the PHP caching.

    What can I do?


  2. Donncha O Caoimh
    Plugin Author

    Posted 3 years ago #

    Have you tried editing the the_views() function and using wp_mail() or error_log() to verify it's being called?

    For performance reasons alone I wouldn't use a plugin like that. Every pageview will write to the database which is slow. You're better off using Google Analytics or WordPress.com Jetpack (or both!)

  3. Satiro
    Posted 3 years ago #

    Thanks for your suggestion!
    I installed jetpack, but how can I show the number of visits for each post? I can not find a function to do it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Super Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic