Support » How-To and Troubleshooting » static homepage with latest post section

static homepage with latest post section

  • Is it possible to have a static home page (index page, whatever you want to call it) where you can have a section that remains static, and doesnt change, and a section that displays your latest post. A bit like the html sites of old which would have a php news section?

Viewing 9 replies - 1 through 9 (of 9 total)
  • If I understand your question I stumbled onto it just the other day. In your dashboard go to the “Reading” tab under “Options” and you can change the display of your “Front Page”.

    Yes, but I would like a static frontpage, with a section that features my latest post, how do I do this?

    There is a plugin called Inline Feed that allows you to display an RSS feed anywhere in a page. You can use this plugin in your static front page and feed it the RSS feed from your posts. I used it for a while on my site (although I don’t anymore). Any plugin that will display an RSS feed will do.

    Or any recent posts plugin… for that matter.
    Just be a bit inventive: create a Page template for that frontpage of yours and include in the template whatever you need.

    Great, this was just the question I’m looking for an answer to. Thanks for the tips about plugins — but, just curious, is there a way to do this on your static front page with the WordPress loop or similar?

    Just found a post at Big Square Blog that does this nicely: http://www.bigsquaredot.com/blog/2007/03/12/display-wordpress-entries-on-static-pages/

    Why do it the difficult way accessing the DB directly? One can do it with a query and a small loop:

    <?php // query posts for the desired categories (10,11,12) and display the 10 recent ones
    while (have_posts()) : the_post() ?>
    // loop content
    <?php endwhile; ?>

    Since you don’t need the original query for any other content of your static front page, you don’t even need to bother to save and restore it using an “auxiliary” variable.

    Sivar, thanks. But I tried what you suggest, and pasted your code (amending the category numbers) into my static page template – which resulted in no output.. no error message, but also nothing posted.

    I’m thinking you have to do something a bit more complicated than a basic loop with a template static page…?

    See this post for a solution using the WordPress loop.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘static homepage with latest post section’ is closed to new replies.