Иконка
-
В function размещен код просмотров.:
/* количество просмотров */ function getPostViews($postID){ $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); return "0 просмотров"; } return ' Просмотров: '.$count; } function setPostViews($postID) { $count_key = 'post_views_count'; $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); } }
Как вставить иконку вместо названия «просмотров:»?
Просмотр 12 ответов — с 1 по 12 (всего 12)
Просмотр 12 ответов — с 1 по 12 (всего 12)
- Тема «Иконка» закрыта для новых ответов.