Simple PHP syntax question about hiding sidebar on specific pages
-
Hi everyone, I am using the code below in my page.php file to hide my sidebar on a specific page (in this case, the page with the id of 2122):
<?php if (is_page('2122')) : ?> <?php else : ?> <?php get_sidebar(); ?> <?php endif; ?>
What I want to know (I’m pretty sure this is relatively easy to do, I’m just not very familiar with php syntax) is how would I edit this code to be able to apply it to multiple pages? For example, if I wanted to hide the sidebar from pages with ids 2122 and 2200, how would I do that? Thanks very much!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Simple PHP syntax question about hiding sidebar on specific pages’ is closed to new replies.