$5
Static front page with both Page and Post content.
I am trying to create the following scenario using a static front page (using the accompanying template named 'Home').
Basically, I have a Page called 'Home' which contains some content which is displayed in the left hand side of the page inside the 'content-left' div tag. The below code loop works fine for this and all is well.
The problem I have is I wish to display the most recent 5 posts (titles and excerpts only) in the right hand side of the page in the 'content-right' div tag as well.
I assume I need a second loop in this div tag but have no idea how to do it. I'm looking for the loop/code to drop inside the 'content-right' div to display 5 most recent posts.
Please let me know if you require any more information.
Basically, I have a Page called 'Home' which contains some content which is displayed in the left hand side of the page inside the 'content-left' div tag. The below code loop works fine for this and all is well.
The problem I have is I wish to display the most recent 5 posts (titles and excerpts only) in the right hand side of the page in the 'content-right' div tag as well.
I assume I need a second loop in this div tag but have no idea how to do it. I'm looking for the loop/code to drop inside the 'content-right' div to display 5 most recent posts.
Please let me know if you require any more information.
<?php
/*
Template Name: Home
*/
?>
<?php get_header(); ?>
<div id="content">
<div id="content-left">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>
</div>
<!-- End Content Left -->
<div id="content-right">
LOOKING FOR THE CODE/LOOP TO GO IN HERE TO DISPLAY 5 MOST RECENT POSTS (TITLE AND EXCERPT ONLY)
</div>
<!-- End Content Right -->
</div>
<!-- End Content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
lowercase | 02/23/10 at 2:31pm |
Answers | Tags
(3) Possible Answers Submitted...
You must be logged in to view answers or answer this question.


