Note: This is to inform you that these snippets are around 2 years old so these might not work for everyone.

Custom Hook: WP Postviews

Home / Code Snippets / Custom Hook: WP Postviews

Reward post authors with points for post views managed by WP Postviews.

Copy the code to your them's functions.php file and save.

  1. How to implement post views hook according to unique IP or excluding the post author?
    Unique IP is a better choice otherwise if a user in incognito mode refreshes then it would generate a stream of points.
    Please resolve this issue as soon as possible.

  2. Please note that this is a custom hook that connects myCRED with the WP Postviews plugin. It does not adjust how WP Postviews work or how that plugin operates. It gives points when the WP Postviews plugin determines a new view. How that determination is made or what limits are enforced is not the task of this hook or myCRED!

Leave a Reply