• Hi,

    I was wondering how I can give the front page’s newest post it’s own style (making it larger, more prominent) while still having the other 10+ posts displayed somewhere else on the page. I figure I’ll need to use a separate div tag for the ‘latest post’, but I’m not sure if there’s a call or tag to display the ‘newest post’ in addition to the the_excerpt tag that’s currently being used.

    Is there a tag or do I need to edit the functions? Any help you could give me would be much appreciated. Thanks!

Viewing 1 replies (of 1 total)
  • You’ll need to use Multiple Loops along with the query_posts() function.

    Your theme’s index.php should have two loops
    query_posts('showposts=1&offset=0'); followed by the first loop and then a second loop with query_posts('showposts=9&offset=1'); right before it.

    Then, just customize the first loop as much as you want. But, you’ll also need to enclose the two loops in a conditional if statement:

    if (!(is_paged()) {
     ... front page code (the two loops)...
    } else {
    ... basic loop for page 2 and so forth ...
    }

    Otherwise, the first post on each of the “Previous Posts” pages will be treated differently.

Viewing 1 replies (of 1 total)
  • The topic ‘Separate style for ‘Latest Post’?’ is closed to new replies.