• Resolved djspark

    (@djspark)


    <?php while (have_posts()) : if(in_category(2)) : the_post(); ?>
    test<br/>
    <?php endif;endwhile; ?>

    on a clean install, default template, just added these, to start modifying kubrick template… WP timed out. But without “if(in_category(2)) : ” , it went really fast…
    i tried this , and worked seamlessly:
    <?php query_posts('category_name=special_cat&showposts=10'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <!-- Do special_cat stuff... -->
    <?php endwhile;?>

    anyone else saw this behaviour ? should I report it as a bug ?

Viewing 1 replies (of 1 total)
  • Possibly because you do it in the wrong order. Try the following.

    <?php while (have_posts()) : the_post();
    if(in_category(2)) : ?>
    test<br/>
    <?php endif;endwhile; ?>

Viewing 1 replies (of 1 total)
  • The topic ‘WP timeout on the_loop’ is closed to new replies.