• gerld

    (@gerld)


    hey all.. i’m trying to write a simple little ifelse statement to filter out a couple categories … but i keep getting an error, and i’m not sure what’s wrong with what i have.. do you see anything jumping out at you ? all these endifs and endwhiles are confusing me

    <?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); { ?>
    <?php if ( in_category('10') ) { ?>
    // ignore category 10 and do nothing and move on
    <?php } ?>
    <?php elseif ( in_category('3') ) { ?>
    // ignore category 3 and do nothing and move on
    <?php } ?>
    <?php else { ?>
    &raquo; <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a><br />
    <?php } ?>
    <?php endif; ?>
    <?php } ?>
    <?php endwhile; endif; ?>

    any help would be greatly appreciated!

  • The topic ‘need help with ifelse statements’ is closed to new replies.