Exclude Post Author (Partially Resolved)
-
I have made some direct change to php code for Excluding Post Author when counting view (“Count Views From” option is set to “Everyone”).
In wp-postviews.php before line 119 added:
global $current_user;In next line in “if” condition added:
$post->post_author != $current_user->ID &&Edited lines together:
global $current_user; if( $post->post_author != $current_user->ID && $should_count && ( ( isset( $views_options['use_ajax'] ) && intval( $views_options['use_ajax'] ) === 0 ) || ( !defined( 'WP_CACHE' ) || !WP_CACHE ) ) ) {@lester Chan, please, confirm.
Looks very simple and easy to add such option in next update.Related to this topic: https://ww.wp.xz.cn/support/topic/plugin-wp-postviews-excluding-the-author?replies=2
The topic ‘Exclude Post Author (Partially Resolved)’ is closed to new replies.