See this special note about using the `the_date’
SPECIAL NOTE: When there are multiple posts on a page published under
the SAME DAY, the_date() only displays the date for the first post
(that is, the first instance of the_date()). To repeat the date for
posts published under the same day, you should use the Template Tag
the_time() or get_the_date() (since 3.0) with a date-specific format
string. Use to add the
date set in the admin interface.
- You are using
query_posts
which screws up the globals -
You are echoing a function that already prints to the browser
- You are actually doing that for all your template tags.
- Change
echo the_date();
to:echo get_the_date('F j, Y');
- Remove the echo from your template tags that already print to the browser or use the alternate functions that return the value.
-
Use a new
WP_Query
orget_posts
instead ofquery_posts
-
Read the Codex. It tells you how to use all these functions and is very helpful 🙂