Problem
I want to display a different header image if the page is a SimplePages page.
- See also Header Images and Themes
Solution #1
In the theme's header.php file, usually in theme/common/header.php
, add the following code to change the image if the page is a SimplePage. This example comes from "Seasons" theme.
<div id="header"> <div class="center-div"> <div id="search-container"> <?php echo simple_search(); ?> <?php echo link_to_advanced_search(); ?> </div> <div id="site-title"> <?php if ($bodyclass=='page simple-page simple-page-home'):?> <img src="my_image.jpg"/> <?php else: ?> <?php echo link_to_home_page(custom_display_logo()); ?> <?php endif ?> </div> </div><!--center-div--> </div>
In the site title div, the original code for the theme was:
<div id="site-title"> <?php echo link_to_home_page(custom_display_logo()); ?> </div>
The changes here check to see if we are looking at a simple page, and if so shows just an image.
Functions Used
Solution #2
Just put the following into your SimplePage
<style type="text/css"> #header {background: transparent url(/omeka/archive/files/yourimage.jpg);} </style>