loop within page template doesn't display posts
-
hey everyone. i kinda get the feeling that this is a super-easy question, but i’m clearly just not seeing something.
basically in my index.php i have a basically filtered loop, displaying only posts with a certain category (this loop is the one below)
i’ve created a second page (which is based on a page template) for other posts, that basically filters out all the ones contained within the index.php loop. this loop is identical to the index.php one in every way, with the exception of queries.
my issue is that this page isn’t displaying anything. no posts, no “content could not be found” message. just my standard “page.php” content layout.
i’m convinced that this is a very basic issue, i’m probably just missing something; iv’e not been doing this long and am still learning the ropes. any help would be fantastic.
thanks!
<?php get_header(); ?> <div class="navigationWrap"> <?php get_sidebar(); ?> </div> <div class="content"> <?php query_posts($query_string . '&cat=103'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="galleryPost"> <div class="galleryHeading"> <h2> <?php the_title(); ?> </h2> </div> <div class="galleryPostInfo"><span> Posted on <?php the_time('F jS, Y') ?> | Posted as <?php the_category(', ') ?> | Posted by <?php the_author_posts_link(); ?> <?php the_tags(' | Tagged as: ', ', ', ''); ?> </span> </div> <div class="galleryPostContent"> <?php the_content('more'); ?> </div> </div> <?php endwhile; else: ?> <h2>Sorry, no posts matched your criteria.</h2> </div> <?php endif; ?> <div class="clear"></div> </div> <?php get_footer(); ?>
- The topic ‘loop within page template doesn't display posts’ is closed to new replies.