Support » Fixing WordPress » is_category question.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Jordan

    (@theoriginaljordan)

    This will probably make it easier to help me out.

    <?php if ( is_category( 'athome' ) ) { ?>
    <img src = "http://images/logo1.png" />
    <?php } else ( is_category( 'whirlweddings' ) ) { ?>
    <img src = "http://images/logo2.png" />
    <?php } else () ) { ?>
    <img src = "http://images/logo3.png" />
    <?php } ?>

    Try this:

    <?php if ( is_category( 'athome' ) ) { ?>
    <img src = "http://images/logo1.png" />
    <?php }
    elseif ( is_category( 'whirlweddings' ) ) { ?>
    <img src = "http://images/logo2.png" />
    <?php }
    else { ?> <img src = "http://images/logo3.png" />
    <?php } ?>

    Jordan

    (@theoriginaljordan)

    I actually just figured it out. It due to my if else statement.

    The proper order was
    if, elseif, else

    Jordan

    (@theoriginaljordan)

    Thanks anyway Harrison, sorry to have wasted you’re time.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘is_category question.’ is closed to new replies.