/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php global $wpdb; $queries = $wpdb->get_results("SELECT ID, post_date FROM $wpdb->posts WHERE post_type='post' ORDER BY post_date DESC LIMIT 1 "); $date = $queries[0]->post_date;global $post; $post = get_post($post); $time = $post->post_date; if($date == $time) { echo "<img class='ico-new' src='"; bloginfo('template_url'); echo "/images/new.png' alt='' border='0' />"; }?>