WordPress.org

Ready to get started?Download WordPress

Forums

how to display n posts on front page of site (2 posts)

  1. kevcpu
    Member
    Posted 4 years ago #

    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.

  2. chinmoy
    Member
    Posted 4 years ago #

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

    Try this.

    Thanks
    C

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.