how to auto random increment for post view
To randomly add 1-5 views, you can change the if ( $should_count block at the bottom to: if( $should_count && ( ( isset( $views_options[‘use_ajax’] ) && (int) $views_options[‘use_ajax’] === 0 ) || ( !defined( ‘WP_CACHE’ ) || !WP_CACHE ) ) ) { $random_increment = rand( 1, 5 ); update_post_meta( $id, ‘views’, $post_views + $random_increment ); … Read more