template loop is accessing all posts content?
-
In a custom theme, I have several page templates on which I want one category only to appear. The posts appear as they should, all contain lists of documents. However today I just discovered that when there is a link to a document that is broken, the page reloads but with *ALL* the posts’ content displayed. I can’t show you a link the site is password-protected.
I think I have made a mistake with the loop but cannot figure this out.
The template is named page-projects.php.<div id="content"> <?php query_posts('cat=4'); ?> <?php if(have_posts()) : ?> <?php while ( have_posts() ) : the_post() ?> <div id="post-<?php the_ID() ?>" class="documents"> <h2 class="postTitle"><?php the_title() ?></h2> <div class="postContent"> <?php the_content(); ?> </div><!-- .postContent --> </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 endif ?> </div><!-- #content -->
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘template loop is accessing all posts content?’ is closed to new replies.