I have a static home page, which works fine. I set my blog posts page to "News" -- it shows the posts, but it shows them twice. Once using my page template, and again using my post template.
So far I just have
index.php
page.php
I have not created any category or single templates.
My wordpress loop on index.php looks like:
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>"><div class="padding"><!--post-->
<div class="date"><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></div>
<div class="title"><h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2></div><br class="clear" />
<div class="entry">
<?php the_content('Read the rest of this entry »'); ?>
</div>
<div class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></div>
</div></div><!--post-->
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php get_search_form(); ?>
<?php endif; ?>
My loop on page.php looks like:
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>"><div class="padding"><!--post-->
<div class="title"><h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2></div><br class="clear" />
<div class="entry">
<?php the_content('Read the rest of this entry »'); ?>
</div>
</div></div><!--post-->
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php get_search_form(); ?>
<?php endif; ?>
I am usually able to find what I'm looking for in the docs and on the forums, but I can't seem to figure out what is causing this? I would expect that it should just show the posts, and maybe the title and description written on the news page if anything. Is there something I should be adding to my templates? Should I create a new template for news (news.php)? Note that I tried doing that as well but it didn't seem to have any affect.