• I’m trying to create a very simple site wherein only the most recent post displays and the other posts are just archived in the toolbar.

    I don’t want any information of the post to be displayed other than the blog title and the date it was posted. There only needs to be an index.php which displays the one post and the archived posts which has the exact same template as the index page.

    What would be the simplest way to achieve this? I’ve been trying to piece together on my own but I keep getting php errors. I’m completely new to php in general.

    I would think since the information I’m trying to query is so limited that there wouldn’t be very much code to plug in to the site.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You could probably do this by eliminating the while loop from the loop… as in instead of:

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

    have

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

    And then you’d have to remove the ending endwhile;

    Thread Starter elliotfsl

    (@elliotfsl)

    What page would I edit to make the archived posts retain the same html/css template as the index?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Easy loop to display one post?’ is closed to new replies.