I just did a site for a client with a static home page so we needed to solve the problem of having a page to show the blog -- in your case "news" summary.
Here is what we did.
Take "page.php" copy and rename it. Call it something like "newspage.php"
We will now make this new page a template specifically to show the blog / news posts.
At the top of the page replace this:
<?php get_header(); ?>
with this:
<?php get_header(); /* Template Name: News */ ?>
Now in the content area take this code:
<?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 »</p>'); ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
</div>
<?php endwhile; endif; ?>
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
and replace it with this:
<?php $temp_query = $wp_query; ?>
<?php query_posts('showposts=12'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
<?php global $more;
$more = 0;?>
<?php the_content('<br /><strong>Read the rest of this entry »</strong>'); ?>
</div>
<?php endwhile; ?>
now create a new page (NOT POST) and you will see in the template menu "News"
Set the page to that, publish it and now you will have a page that shows all your psot with summary's. make sure to put in "Read more" breaks as well.
|