Check if user already visited this post today
Note! This code was not tested! <?php function my_visitor_cookie($post_id) { if ( empty($post_id) ) { global $post; $post_id = $post->ID; } // get post meta $count = get_post_meta($post_id, ‘unique_post_visits’, true); // if there was no meta value if( empty($count) ) { $count = 0; } // check if cookie was already set (cookie name for … Read more