Difference between these two exclusion conditionals?
-
I have found two code snippets for excluding an element (in this case, the sidebar). Can anyone tell me what the difference is between them? The first one is always the one recommended, but the second one seems to do exactly the same thing.
<?php if (is_page('1')) {} else { get_sidebar(); } ?>
<?php if (!is_page('1')) { ?> <?php get_sidebar(); ?> <?php } ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Difference between these two exclusion conditionals?’ is closed to new replies.