/ Published in: PHP
Expand |
Embed | Plain Text
$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' />"; }?>
Comments
Subscribe to comments
You need to login to post a comment.

Why not just use the query_posts() function?
http://codex.wordpress.org/TemplateTags/queryposts