Combine Conditional Logic Statements
-
Can I combine conditional logic statements?
For example I want to show a widget on these product categories:
is_product_category( array( ‘generators’, ‘portable-generators’, ‘standby-generators’ ) )
But I also want to show on these product tags:
is_product_tag( array( ‘honda-generators’, ‘honda-industrial-generators’, ‘briggs-stratton-generators’, ‘generac-generators’ ) )
It works if I only list one of the conditional statements but pages get messed up if I enter both as:
is_product_category( array( ‘generators’, ‘portable-generators’, ‘standby-generators’ ) )
is_product_tag( array( ‘honda-generators’, ‘honda-industrial-generators’, ‘briggs-stratton-generators’, ‘generac-generators’ ) )I feel I am missing some simple bracket or semicolon somewhere to accomplish this.
Any ideas?
The topic ‘Combine Conditional Logic Statements’ is closed to new replies.