Associated Conditional Tags
-
So I there must be an association code to group Conditional Tags together.
Here is what i got:
<?php if ( is_page(‘1’) ) { ?>
**CODE X**
<?php } ?><?php if ( is_page(‘2’) ) { ?>
**CODE X**
<?php } ?><?php if ( is_page(‘3’) ) { ?>
**CODE X**
<?php } ?>its pretty anoying to have to re write code x over and over.
i tried using &&:
<?php if ( is_page(‘1’) && is_page(‘2’) ) { ?>
**CODE X**
<?php } ?>but that didnt work.
There must be an easier way. Anyone?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Associated Conditional Tags’ is closed to new replies.