Forums

[resolved] How Can I Use This If Statement on in_category... (3 posts)

  1. andymacdonalduk
    Member
    Posted 2 years ago #

    Hey Guys,

    I am currently using the following if statement on my blog, but need to modify how it works slightly, im just not sure what to change.

    Currently im using...

    <?php if ( in_category('27') ) { ?>

    to show a slightly different layout. How can i add MORE that the one category in the statement? Currently im using category 27, but i need to include category 13 into that statement too.

    where do i add the '13' to in '<?php if ( in_category('27') ) { ?>' please?

    Kind Regards,
    Andrew

  2. stvwlf
    Member
    Posted 2 years ago #

    <?php if ( in_category('27') || in_category('13') ) { ?>

    if in cat 27 or in cat 13 ....

  3. andymacdonalduk
    Member
    Posted 2 years ago #

    Fantastic, that did exactly what i wanted, thank you very much sir!!

Topic Closed

This topic has been closed to new replies.

About this Topic