I’ve been trying to put H5 and H6 tags to the recent posts using query post, but
Wordpress doesn’t want to apply them correctly. It seems to apply them only to the first result, but on the rest, it just discards the second item of the list.
I’m going to paste the sidebar.php and some lines of the style.css. I will greatly appreciate your help. I’ve been fiddling with this for three hours now with no luck.
http://www.estamosobservando.com
sidebar.php
<div id="widget">
<h3>Latest posts</h3>
<?php query_posts('posts_per_page=3'); if (have_posts()) : while (have_posts()) : the_post();?>
<ul>
<li><h5><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5></li>
<li><h6><?php the_date(); ?></h6></li>
</ul>
<?php endwhile; endif; ?>
style.css
#widget { padding: 133px 0px 0px 20px; text-align:left; }
#widget ul {margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; list-style-type:none; list-style-image: none; text-decoration: none;}
#widget li { margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; list-style-type:none; list-style-image: none; text-decoration: none; }
All three of your latest posts are from today, May 30.
From the WordPress docs:
Alternatively, you could succumb to how
the_dateworks, and modify your layout a little to effectively have the date as a heading that encompasses all posts for that date.