Using variables with is_page conditional
-
hello,
first I create variables as below with wordpress page ID’s:
<?php
$chinesej = array(992,1214,1216);
$supercom = array(1145,1336,1338);
?>then to use them..
<?php
if ( is_page($chinesej . $supercom)) {
the_field(‘1-p’, ‘option’);
}
?>They do not show unfortunately. Can I use multiple variables in is_page or only one?
The periods to separate work when I use the variables in echo i.e<?php
if ( is_page($flowersk)) {
echo $u1kitesclo . $brt1 . $scnw . $brt2;
}
?>But not as desired in the is-page.
Thanks,
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Using variables with is_page conditional’ is closed to new replies.