Forums

[resolved] To define same action for 2 or more categories (3 posts)

  1. julious
    Member
    Posted 4 years ago #

    if ( in_category('18') ) {
              action...
    }

    and as I do to define that same action for more categories? I tried:

    if ( in_category('18,19,20') ) {
              action...
    }

    but it didn't work.

  2. actorjiml
    Member
    Posted 4 years ago #

    You can find the answer here, but basically "You'll have to use PHP || (logical OR) && (logical AND) in the expression."

  3. julious
    Member
    Posted 4 years ago #

    correct. tks!

Topic Closed

This topic has been closed to new replies.

About this Topic