I am using WP Post Views plugin to display the post number of views. To do so, I use:
<?php if(function_exists('the_views')) { the_views(); } ?>
This plugin gives 3 choises in its setting :
- Count Views From Everyone
- Count Views From Guests only
- Count Views From registered users only
My website is a private community of authors. I have created some badges that are awarded automatically if some conditions are met.
For example, I award a badge to an author when its post attain a certain number of views by the other members of the community. (I use add_action( 'update_post_meta', 'award_badge'
on the meta field updated by the_views();
)
The problem is: The plugin I am using can increment the number of a post views if the author himself see it. It will be good if the number of views increase only when other authors see the post.
I hope my explanation is clear enough. I thank you for your time.
Questions: Is there a plugin that provides this feature of excluding its own post visits from views count?
Is there a piece of code that can be a starting point for me to create a post count views plugin?
You usual help is appreciated.
Edit after S_Ha_Dum comment:
The link to the code source is :http://plugins.trac.wordpress.org/browser/wp-postviews/trunk/wp-postviews.php