If you publish more than one post per day on your blog, it would be a good idea to display other posts that you have written on the current day to encourage your visitors to read them as well.
Mixed with some easy PHP, query_posts()
date and time parameters can be very useful. For example, the following code gets today's date with PHP, and then display all posts published within the day.
Simply paste this code anywhere on your template where you'd like your posts to be displayed. A good idea should be to display it on single.php
, just after the main post and before the comments.
<?php $current_day = date('j'); $current_month = date('m'); $year = date('Y'); query_posts('day='.$current_day.'&month='.$current_month.'&year='.$year); if (have_posts()) : while (have_posts()) : the_post(); ?> // WordPress loop endwhile; endif; ?>