query_posts() function acts weird… need help!
-
Dear WP gurus!
Please help me to clarify:
when I’m trying to show posts from a single or multiple categories using this in the page code:
<?php query_posts(cat=’3′);> or <?php query_posts(cat=’3,4,5′);>
as a result I have a completely blank page???
But when I excluding the category like this:
<?php query_posts(cat=’-4′);>
as a result I have all posts except the posts from category with ID 4, as I think it works perfect…
but why then WP generates blank page when I tell him to show category with a specified ID??Here is a complete loop code it’s quite simple:
<?php query_posts(‘cat=3’) ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?><!–LOOP CONTENT–>
<?php endwhile; ?>
<?php endif; ?>Thnx in advance for help!
The topic ‘query_posts() function acts weird… need help!’ is closed to new replies.