right here goes...
I am basically tring to make a single page as a sort of portal, so the home page will consist of these pages:
- about
- work
- blog (news)
I have managed to display the blog and the "about" page but i can't get the second page to show, here is what i am using in page.php (wp set to display static page):
<?php get_header(); ?>
<div class="grid_7" id="intro">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><?php the_title(); ?></h2>
<div class="entry">
<?php the_content('<p class="serif">Read the rest of this page »
'); ?>
<?php wp_link_pages(array('before' => '<strong>Pages:</strong> ', 'after' => '
', 'next_or_number' => 'number')); ?>
</div>
</div>
<?php endwhile; endif; ?>
<?php edit_post_link('Edit this entry.', '', '
'); ?>
</div><!--intro end-->
<div class="grid_5" id="news">
<?php
$lastposts = get_posts('numberposts=3');
foreach($lastposts as $post) :
setup_postdata($post);
?>
<h2><a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a></h2>
<?php the_content(); ?>
<?php endforeach; ?>
</div><!--news end-->
<div class="grid_7" id="contact">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><?php the_title(); ?></h2>
<div class="entry">
<?php the_content('<p class="serif">Read the rest of this page »
'); ?>
<?php wp_link_pages(array('before' => '<strong>Pages:</strong> ', 'after' => '
', 'next_or_number' => 'number')); ?>
</div>
</div>
<?php endwhile; endif; ?>
<?php edit_post_link('Edit this entry.', '', '
'); ?>
</div>
<?php get_footer(); ?>
you can see what i have got here (the blue div neeads to show "work" id=5):
test site
can anybody advise how to show these 3 items on a single page ?
thanks in advance
:K