How to show new posts in Wordpress static home page?

Discussion in 'WordPress' started by adlist, Sep 23, 2010.

  1. #1
    I am using wordpress static page function. However, I also want to show excerpts of latest posts within the page.

    How should I do this? Any wordpress plugins that can work like this?

    Using wordpress 3.01

    Thanks for the help.
     
    adlist, Sep 23, 2010 IP
  2. ajwalsh

    ajwalsh Peon

    Messages:
    291
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't get exactly what you are asking. Why are you showing your posts in a static page? Is this in addition to your main index template with your posts?
     
    ajwalsh, Sep 23, 2010 IP
  3. tn33

    tn33 Active Member

    Messages:
    229
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #3
    You "could" do it this way:

    The page you currently have as a static page, make it into a post and use the "Stick this post to the front page" option in the "Visibility" options on the right of your WP edit post page. Then in Settings/Reading options change "Blog pages to show at most" to choose how many excerpts you want to show.

    You may need to add "more" tags in your posts or choose to use an excerpt plugin to make sure excerpts are shown and not full posts.

    That's one way you could get around it.

    Tony
     
    tn33, Sep 24, 2010 IP
  4. sar420

    sar420 Notable Member

    Messages:
    3,147
    Likes Received:
    212
    Best Answers:
    0
    Trophy Points:
    230
    #4
    You can use your blog's rss feeds to display the latest posts on your static homepage by using the Simplepie wordpress plugin. Its an RSS parser sort of a thing..and a bit hard to configure. You might also need to use the exec-php plugin to make it work
     
    sar420, Sep 24, 2010 IP
  5. bob25

    bob25 Well-Known Member

    Messages:
    1,519
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    128
    #5
    I agree and would like to add that if the template you're using shows the full post rather than the excerpts of the post you can use a plugin to show just the excerpts, I use a plugin called Homepage excerpts.

     
    bob25, Sep 24, 2010 IP
  6. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #6
    its simple :)

    
    <ul>
    <?php query_posts('showposts=5'); ?>
    
    <?php while (have_posts()) : the_post(); ?>
    <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
    
    <li><?php the_excerpt(__('(more…)')); ?></li>
    <?php endwhile;?>
    </ul>
    PHP:
    will display the last 5 posts in a list with excerpt summaries.
     
    just-4-teens, Sep 26, 2010 IP
  7. adlist

    adlist Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks guys for the replies and the code. I will try to modify my template and see how it goes.
     
    adlist, Sep 29, 2010 IP
  8. digidunc

    digidunc Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I too have a static front page and want to show post excerpts on it. I would like to try this code but don't know where I should place it.

    some advice would be greatly appreciated.

    best
    Digidunc



     
    digidunc, Dec 17, 2010 IP
  9. wpfan

    wpfan Member

    Messages:
    64
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #9
    You need to use that in your custom page template.
     
    wpfan, Dec 17, 2010 IP
  10. digidunc

    digidunc Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Ok fine, but does it matter whereabouts the code is placed?
     
    digidunc, Dec 17, 2010 IP
  11. wpfan

    wpfan Member

    Messages:
    64
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #11
    Place it between your content container or wherever you want to show the list.
     
    wpfan, Dec 17, 2010 IP
  12. digidunc

    digidunc Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Many thanks for the advice

    Digidunc
     
    digidunc, Dec 20, 2010 IP