if-else background switch
-
I am trying to modify the following piece of code in header.php:
<?php /* Checks to see whether it needs a sidebar or not */ if ((! $withcomments) && (! is_single()) && (! is_page())) { ?>
#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg.jpg") repeat-y top; border: none; } <?php } else { // No sidebar ?>
#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; } <?php } ?>
Here’s what I want:
I want to use kubrickbg.jpg for all pages EXCEPT for pages rendered with page.php. That is, all pages except those I create through the admin panel (that aren’t the links or archives template). I’m not to sure what the requiste conditions in the if statement above are for accomplishing this. Here’s the particular problem: I have a 3-column look, the colors of which are established by the background image, except that when one clicks the permalink of a post in order to view comments, it switches to kubrickbgwide.jpg. I don’t want this. Any help?
- The topic ‘if-else background switch’ is closed to new replies.