WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How do I display only the most recent post on my main page? (4 posts)

  1. jack.mcconnell
    Member
    Posted 5 years ago #

    How do I display only the most recent post on my main page?

    At the moment, my posts list from newest at the top to oldest towards the bottom but i only want to display the last, most recent post on the front of my wordpress blog. Is this possible?

    Any help is much appreciated!
    -Jack

  2. kwbridge
    Member
    Posted 5 years ago #

    On the main index page - index.php - you can add

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

    right before

    <?php while (have_posts()) : the_post(); ?>

    and only the most recent post will be displayed.

  3. Shane G
    Member
    Posted 5 years ago #

    Hi,

    You can use recent posts widget/plugin into your blog display the desired number of recent posts.

    Thanks,

    Shane G.

  4. jack.mcconnell
    Member
    Posted 5 years ago #

    Thanks kwbridge!

    That worked like a charm!

    Many thanks :)
    -Jack

Topic Closed

This topic has been closed to new replies.

About this Topic