WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
[resolved] [possibly bug] wpp_get_views treats the "all" parameter like the "daily" (5 posts)

  1. Vahid
    Member
    Posted 8 months ago #

    When I use the following code in the loop, it shows only the last 24 hours views. In other words, the wpp_get_views treats the "all" parameter like the "daily" parameter. Is this a bug or I'm doing something wrong?

    <?php if (function_exists('wpp_get_views')) { echo wpp_get_views($post->ID, 'all' ); } ?>

    It should be mentioned that the "daily", "weekly", and "monthly" parameters works perfectly.

    http://wordpress.org/plugins/wordpress-popular-posts/

  2. Héctor Cabrera
    Member
    Plugin Author

    Posted 8 months ago #

    Hi Vahid,

    I'll take a look into it and reply back as soon as possible.

  3. Vahid
    Member
    Posted 7 months ago #

    Just to mention that I'm still awaiting the solution:-)
    Thanks Héctor.

  4. Vahid
    Member
    Posted 2 months ago #

    Just to remember that I'm still awaiting the solution:-)
    Thanks Héctor.

  5. Héctor Cabrera
    Member
    Plugin Author

    Posted 2 months ago #

    Oh my God, I completely forgot about this! I'm so sorry for taking so long to reply, Vahid!

    You were right: it's a bug. A proper fix will be available on the next version of the plugin.

    Quick workaround, for now:

    <?php
    if (function_exists('wpp_get_views')) {
        // Without the range parameter, the function will retrieve the All-times views count by default
        echo wpp_get_views($post->ID);
    }
    ?>

Reply

You must log in to post.

About this Plugin

About this Topic