WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Number of blog entries on first page

[Resolved] Number of blog entries on first page

  • McDragon
    Member

    @mcdragon

    I have looked through the documentation and forums for this one, I think it might need tweaking the design, but I think this should really be part of the Settings – Reading (setup).

    I want to control the number of blog entries on the first page, in my case I want just the one, the latest one.

    I tried using the »Blog pages show at most« bit that affects everything including the archive view. I think this could be really a feature request but cannot wait that long and wish to solve it now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • McDragon
    Member

    @mcdragon

    Isn’t this just typical, I ask a question only to find the answer soon after myself.

    As index.php is usually the first page displayed you have to go into the template and add the following line of PHP code just immediately after the have_posts check … if (have_posts() …

    <?php query_posts('showposts=1'); ?>

    This will work, however I would still route for a setting on the Settings page 🙂

    McDragon
    Member

    @mcdragon

    By the way, the documentation for this is here:
    http://codex.wordpress.org/Template_Tags/query_posts

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Number of blog entries on first page’ is closed to new replies.