Attempt To Use Multiple Loop Produces Blank Page
-
I’m trying to create unique category pages and on these pages, I would like to use at least multiple loops to display two different types of category listings (I’ve tried other methods, and now this one isn’t working, I might cry) I’d actually like to shoot for three loops, but if I can only get two I could deal with it.
That being said, this code below produces a blank page, so I’d like to get an idea where I’m going wrong.
<?php get_header(); ?> <h2>New Releases</h2> <?php query_posts(array('category__and' => array(8,387)));?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a> </li> <?php endwhile; ?> <h2>Backlist</h2> <?php $my_query = new WP_Query(array('category__and' => array(8,387))); ?> <?php while ($my_query->have_posts()) : $my_query->the_post(); ?> <li><a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a> </li> <?php endwhile; endif; ?> <?php get_footer(); ?>
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Attempt To Use Multiple Loop Produces Blank Page’ is closed to new replies.