WordPress.org

Ready to get started?Download WordPress

Forums

in_category() problem (1 post)

  1. feverinlove
    Member
    Posted 6 years ago #

    Hi there,
    I have a pretty large sidebar file which checks for every category. The code below is working properly:

    <?php if(in_category(1)) { ?>
    <h3>Top 10 - 1</h3>
    <ul>php code</ul>
    <?php } elseif(in_category(2)) { ?>
    <h3>Top 10 - 2</h3>
    <ul>php code</ul>
    ....
    
    ....
    <?php } ?>

    I want to add another set like this, but the in_category() check does not work for the second set. It only works when I remove the first set. Is there a solution for this?

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 6 years ago by element94_2007
  • This topic is not resolved
  • WordPress version: 2.0.11