WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
Suggestion: Display options for wpp_gets_views() (6 posts)

  1. edwardnh
    Member
    Posted 3 years ago #

    I have encountered a conflict between WP-PostViews' counter function and my present cache plugin W3 Total Cache. So I am switching my view count to the WordPress Popular Posts plugin. As I make the switch, I wanted to make a few suggestions.

    The PostViews plugin has a display option setting on the admin page that allows administrators to restrict who sees the view count. You can have t for everyone, admin only or homepage only. I think this could be a good feature to have for WPP. Is this something you have considered adding?

    Also, since I have only had WPP for two months. It doesn't have the right view count for my older posts. I have manually updated the view counts of my twenty most viewed posts in PhpMyAdmin to use WPP as my "most viewed" plugin. Is there any way to set up a viewcount import function from Google Analytics or WP-PostViews or some other view counter? If anyone who has info on this, please comment.

    Very good plugin. Thanks for keeping it up-to-date as well.

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

  2. Héctor Cabrera
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Ed,

    Let's see if I understood this correctly: what you want is to be able to determine who can see the views count on the front-end, right?

    About the views count, thing is that my plugin keeps it own registry - it doesn't import the data created by other plugins. That's why the data shown by my plugin differs from what the WP-PostViews plugin has. This guy here has successfully imported the views count from the WP Lesterchan Views plugin to WordPress Popular Posts, maybe he can guide you through the process. I might consider add a way to import this data on a future release of my plugin though since some other people have requested this in the past, too.

  3. edwardnh
    Member
    Posted 3 years ago #

    That's right, I want to filter who can see the views count on the front end, so that I might be able to add a view count to the front page for admin purposes but for no one else.

    And I will definitely take a look at the import function you just mentioned. Would be a great feature.

    Cheers.

    Ed

  4. Héctor Cabrera
    Member
    Plugin Author

    Posted 3 years ago #

    That's right, I want to filter who can see the views count on the front end, so that I might be able to add a view count to the front page for admin purposes but for no one else.

    Alright then. That's not too difficult to change. Will try a few things and come back here with a patch so you can try it out, alright?.

  5. Héctor Cabrera
    Member
    Plugin Author

    Posted 3 years ago #

    Actually, here's a simpler solution. You can hide the views on your theme by doing something like this:

    <?php if( current_user_can('manage_options') ) : ?> // current user is admin
    Total views: <?php echo wpp_get_views(get_the_ID()); ?>
    <?php endif; ?>
  6. edwardnh
    Member
    Posted 3 years ago #

    Thanks for that, Hector. Separately, I am working on an issue regarding minify in W3 Total Cache and the count from WPP. I saw a bug report on this. When I figure out what the problem is I will add my comments to that thread.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic