• 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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter loomybear

    (@loomybear)

    oh… I’m sorry… almost forgotten
    when I use
    <?php query_posts(‘category_name=usefull_info’);>
    wp generates blank page too!

    but
    <?php query_posts(‘p=47’); ?>
    works fine.

    I donno what to do I tried evrth.

    I’m having the same exact problem. Does anyone know what’s causing it?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘query_posts() function acts weird… need help!’ is closed to new replies.