Έτσι θα διαβάσεις ένα μήνυμα στο Facebook χωρίς να το καταλάβει ο αποστολέας
Σε όλους μας έχει τύχει από τη μία να θέλουμε να διαβάσουμε αμέσως το μήνυμα που λάβαμε στο Messenger του…[24 Οκτωβρίου, 2021 - 01:23]
function track_post_views($post_id) { if ( !is_single() ) return; if ( empty($post_id) ) { global $post; $post_id = $post->ID; } $count_key = 'post_views_count'; $count = get_post_meta($post_id, $count_key, true); if ($count == '') { add_post_meta($post_id, $count_key, '1'); } else { $count++; update_post_meta($post_id, $count_key, $count); } } add_action('wp_head', function() { if (is_single()) { track_post_views(get_the_ID()); } });