Can i stop layout.php run a div for only home page?

I want to run bodyheader div only on home page, is this possible?

div id=“bodyheader”>
div class=“overlay”>
p>font color=“white”>Gi din gave nå


It is currently running from layout.php becuse home page wont place it the right place. <---- it is the header picture

If I understand your question correctly then you want to only show the body header div on the home page.

You can do this in several ways;

  1. You could create a new layout.php file for the home page and store this in the template directory in a sub folder;

    You’d then need to tell Pulse to use the new home page theme for the home page of the site. In Pulse edit your home page and add in the following tag;


  1. Another solution is to use a single theme file but add a block of conditional code to it so that it only displays the header image on the home page. Again there are several ways to do this but the easiest has to be either wrapping the block in a conditional like this;
<?php if ($page == 'home'){ //add your home page content here } ?>

or by adding a CSS style to the head of the template that simply hides the content on all but the home page;

<?php if ($page != 'home'){ ?>

< style>
#bodyheader { display:none; }
</ style>

<?php } ?>

This topic was automatically closed after 24 hours. New replies are no longer allowed.