WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Stats View Counter
[resolved] It may have stopped updating (3 posts)

  1. themaulsquad
    Member
    Posted 12 months ago #

    Hi Adam

    Thanks for making this, it fulfills a really important function on my site!

    I'm a bit concerned as it seems to be malfunctioning. I have a 'Popular Posts' sidebar widget that I use your plugin for for ranking posts. It used to rank by number of comments with the following php:

    $popular = new WP_Query('showposts='. $posts .'&orderby=comment_count&order=desc');

    to:

    $popular = new WP_Query('showposts='. $posts .'&meta_key=views&orderby=meta_value&order=desc');

    And it seemed to work fine. Now however it doesn't appear to be updating (I'm aware of the 3 hour refresh) and it isn't displaying my 'top' article according to my jetpack stats.

    Is there something I am doing wrong, or someway to kickstart the counter to ensure it is pulling the value in properly?

    http://wordpress.org/extend/plugins/wp-stats-view-counter/

  2. Adam Capriola
    Member
    Plugin Author

    Posted 12 months ago #

    First, showposts should be replaced with posts_per_page (link). Also try orderby=meta_value_num.

  3. themaulsquad
    Member
    Posted 12 months ago #

    Hot damn I wasn't expecting a reply that quick!

    That looks to have resolved it, the article that should be top IS top, although the rest are in a slightly incorrect order, I'll wait to see if that resolves after the next update though.

    Thanks for the help!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.