Implementation to count page visits of unique visitors based on a cookie
Here’s a minimum working example… (note: this is untested code.) add_action(‘init’, ‘custom_rsvp_handler’); function custom_rsvp_handler() { // for singular posts only // (could also check for event post type here) if (!is_singular()) {return;} // set cookie expiry length (eg. 28 days) $cookielength = time()+(60*60*24*28); // set a cookie key based on post ID global $post; $cookiekey … Read more