query_posts within the loop?
-
Hi there. For long and complicated reasons I am needing to use query_posts within the wordpress loop. Is this possible? if so how?
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> -the content etc- <?php query_posts('showposts=99&cat=1153'); ?> <?php while (have_posts()) : the_post(); ?> <li><?php the_title(); ?></li> <?php endwhile; ?> <?php endwhile; else: ?> <?php endif; ?>
I understand the code I place here might be ridiculous…
The reason is: I’m making a discography. I want a single post to have a list of posts within a certain category. The category name will be placed there using custom fields.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘query_posts within the loop?’ is closed to new replies.