I am using this code:
<?php
query_posts( 'posts_per_page=5' );
while ( have_posts() ) : the_post();
echo '<li>';
the_title();
echo '</li>';
endwhile;
wp_reset_query();
?>
The code works but there are 2 posts and it’s only returning the latest one.
I need it to show them all.
Can anyone help please?
Thanks
Try this: