I am new to WordPress and not that familiar with coding. Could someone explain how to add a loop to my blog to the static front page? I'd like for the first 10 blog posts to be displayed under my content on the home page. Please keep in mind I am not that familiar with coding so step by step instructions would be very helpful. I found this code
query_posts( 'showposts=10' );
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
// do something
endwhile;
else :
// no posts found
endif;
?>
but I am unsure how to use it. What do I need to delete, insert, where does it need to be inserted in the code, etc. Sorry for being such a beginner, but any help would be greatly appreciated.
new WP_Query()
. Please refer to this question/answer explaining why not to usequery_posts()
, and how to useWP_Query()
. – Chip Bennett Aug 30 '13 at 16:24