how to use plugins hook (custom caching) in wp-supercache?
-
Hi, I would like to exclude some plugins from being cached, in particular wp-postviews (https://www.ads-software.com/extend/plugins/wp-postviews/) but have no idea how to do it.
I’m using wp-postviews 1.02 and it has this function to count the views.
### Function: Calculate Post Views add_action('loop_start', 'process_postviews'); function process_postviews() { global $id; $post_views = intval(post_custom('views')); if(empty($_COOKIE[USER_COOKIE])) { if(is_single() || is_page()) { if($post_views > 0) { update_post_meta($id, 'views', ($post_views+1)); } else { add_post_meta($id, 'views', 1); } } } }
Could anyone give me some directive how to make it always count the post views even when caching is enabled? What should i put inside ‘wp-super-cache\plugins’ ?
Thanks in advance.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘how to use plugins hook (custom caching) in wp-supercache?’ is closed to new replies.