use a page template to change some pages bkgd image
-
hi there
i have been trying to figure out a way to use a custom page template to change the background color of some of my pages
i’m using the kubrick theme in which the default background image is kubrickbg.jpg. i have made up a yellow version called kubrickbgYELLOW.jpg which i wish to use sometimes by manually setting a custom page template when i write a page.
i see that the only place where kubrickbg.jpg is specified is in the header.php in this bit of code
<style type="text/css" media="screen">
<?php
// Checks to see whether it needs a sidebar or not
if ( !$withcomments && !is_single() ) {
?>
#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 } ?>
</style>
so i’m guessing i need an if statement somewhere in there to check which template is being used and switch the bg images but have no idea how to implement this
i’m hoping this is relatively simple and there is a generous person out there to help this clueless php newbie
thanks
leeland
- The topic ‘use a page template to change some pages bkgd image’ is closed to new replies.