Forums

  • # January 8, 2009 at 10:57 pm

    Can anyone share with me how to set up my home page so that it only shows one post of my blog (the most recent post) with a continue reading link… What code to I change to do that? What I want is to have ONLY the most recent post on my home page then have a link in the navigation for Blog.. then that page would show the whole blog list.. however many post I allow to be shown on a page. Does that make sense?

    So I guess I need to know how to do both. how to I make another page show the whole blog rather than the home page, but have the home page show just one most recent post.

    as an example I kind of like how this guy set his up, he put the rest of his posts in an archive.

    Thanks

    # January 10, 2009 at 11:09 am

    You might want to try a query_posts. http://codex.wordpress.org/Template_Tags/query_posts

    You can save this as your home.php and set wordpress to display this as a static home page.

    Example:

    Code:
    < ?php // display only one post query_posts('showposts=1'); global $more; // set $more to 0 in order to only get the first part of the post $more = 0; // the Loop while (have_posts()) : the_post(); // the content of the post the_content('Read the full post »'); endwhile; ?>
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag