Infinte loop problem
-
Having problems with some php
Attempting to:
if in certain parent category, dynamically get the child category then list it’s posts or if in other parent category display something else.
My bad php is letting me down and I’m creating an infinite loop – could someone please set me right
<?php while (have_posts()) : the_post(); ?> <?php if (in_category('something')) { ?> <?php if (is_category( )) { $cat = get_query_var('cat'); $yourcat = get_category ($cat); } ?> <?php query_posts('category_name='.$yourcat->slug.'&showposts=20'); ?> <li><a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a></li> <?php } else { ?> <?php dynamic_sidebar( 'primary-widget-area' ); ?> <?php } ?> <?php endwhile; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Infinte loop problem’ is closed to new replies.