Header image in item view


We are using the Berlin theme and I recently added a header image. Is there a way that I can make that image go away in an item record? If so, can you please share details on how to do that?


The header image is handled in your theme’s common/header.php file.

You’ll have to add a check there for whether you’re on an item show page. if (isset($item)) may be the simplest option.

I don’t know php, but can usually figure it out if I have clear direction. Can you be more specific about the code and where it goes? Thanks!

Anyone out there that can help me out with this? I’ve checked with people in-house and I am afraid I’m not getting anywhere. Kindly advise. Thanks!

The common/header.php file in your theme has a line like this, which is what’s responsible for outputting the header image.

You can surround that line with if and endif statements to make the header only appear when some condition is met. A simple condition to try would be checking for the existence of an $item variable on the page:

<?php if (!isset($item)): ?>
    <?php echo theme_header_image(); ?>
<?php endif; ?>

Thanks for your response. I am afraid that was not successful. I have attached a screenshot of the header.php where I inserted the code. I am an absolute novice, so I may have misinterpreted your direction. Any further guidance would be appreciated.

I would love to see an answer to this question. I don’t understand the instructions which were given previously. Anyone know how to remove the header image on an Item Page?