Forums

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

  1. Satiro
    Member
    Posted 3 months ago #

    Hi,
    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() ?>
    <!--/mfunc-->

    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?

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. Donncha O Caoimh
    Member
    Posted 3 months 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
    Member
    Posted 3 months 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.

Reply

You must log in to post.

About this Plugin

About this Topic