Using Conditional tags in Sidebar
-
I would like some help using conditional tags. For example, I’m trying to use different text in the sidebar for my pages. A, B, and C will have the same text in the sidebar, D will have it’s own text, and I would like a catch all for all additional pages i.e E, F, etc.
This code is working, but I don’t know what to use for the catch all.
<?php if (is_page(array(A,B,C))) { ?>
<p>Page A, B, and C content</p>
<?php } ?><?php if (is_page(D)) { ?>
<p>Page D content</p>
<?php } ?>Please advise, thank you!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Using Conditional tags in Sidebar’ is closed to new replies.