Changing the header background based on which page you are on
-
So I tried this code:
<?php if (is_page("blog")) { echo '<div id="header" style="background:url(' . get_bloginfo('url') . 'pagegraphics/blogbanner.jpg) no-repeat bottom; ">'; } elseif (is_page("services")) { echo '<div id="header" style="background:url(' . get_bloginfo('url') . 'pagegraphics/servicesbanner.jpg) no-repeat bottom; ">'; } else { echo '<div id="header" style="background:url(' . get_bloginfo('url') . 'pagegraphics/girlspotwebbanner2.jpg) no-repeat bottom; ">'; } ?>
But apparently for some reason it can not find the actual image to display, there is something wrong witht he code that I can not for the life of my figure out. When I view this code through firebuug online, I see the background image there without a problem, but it is not actually displaying anything – just a big blank spot.
Any thoughts?
I’d also like thoughts on showing different sidebars based on which page you are on..
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Changing the header background based on which page you are on’ is closed to new replies.