WordPress.org

Support

Support » How-To and Troubleshooting » how to display n posts on front page of site

how to display n posts on front page of site

  • I created a theme for a site and would like to display the top n posts on the home page. Considering that I am using wordpress as a CMS, the page already has a loop to display the content for the home page, how can I use another loop for displaying the links for the posts or is there a better strategy? Any help would be greatly appreciated.

Viewing 1 replies (of 1 total)
  • <?php
    query_post('showposts=10');
     //now start your loop
     while(have_posts()): the_post();
     [WRITE HERE POST DISPLAY CODE]
     endwhile;
    ?>

    Try this.

    Thanks
    C

Viewing 1 replies (of 1 total)
  • The topic ‘how to display n posts on front page of site’ is closed to new replies.