Wordpress LScache Plugin: Postview Not Working
Last Updated on: Wed, 15 Apr 2026 00:00:02 Pageviews no longer increase after installing LS Cache. When I uninstall the plugin it works normally. I will be glad if you find a solution for me. The code I use in functions.php: function gt_get_post_view() $count = get_post_meta( get_the_ID(), post_views_count, true ) return $count views function gt_set_post_view() $key = post_views_count $post_id = get_the_ID() $count = (int) get_post_meta( $post_id, $key, true ) $count++ update_post_meta( $post_id, $key, $count ) function gt_posts_column_views( $columns ) $columns[post_views] = Views return $columns function gt_posts_custom_column_views( $column ) if ( $column === post_views) echo gt_get_post_view() add_filter( manage_posts_columns, gt_posts_column_views ) add_action( manage_posts_custom_column, gt_posts_custom_column_views ) The code I use in single.php: Hi, yes , because the view number is also cached you will need to convert your post view to ajax call , so it wont be cached or use some of them cache-compatible post view counter , e.g. https://wordpress.org/plugins/remoji/ best regards, Thanks for your answer, I dont have enough knowledge to code. Can you give me an LS cache compatible code, please. To add to functions.php and single.php. Or can you edit my code, please. You can use this plugin for postview count and display: https://wordpress.org/plugins/remoji/
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference