Views count with time limit per IP
I’ve been looking for function about post views count. I found this simple functions using update and get post meta. function setPostViews($postID) { $count_key = ‘views’; $count = get_post_meta($postID, $count_key, true); if($count==”){ $count = 0; delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, ‘0’); }else{ $count++; update_post_meta($postID, $count_key, $count); } } What I want is, to add functions to … Read more