I am working with the twenty twelve theme I only want my header image on the homepage. And not on the other pages.
I have tried a few things I found on the web, but none have worked so far.
All of my edits have been made to the child theme.
I am working with the twenty twelve theme I only want my header image on the homepage. And not on the other pages.
I have tried a few things I found on the web, but none have worked so far.
All of my edits have been made to the child theme.
hmm not kick ass coder, but would something like this work?
<body <?php body_class(); ?>>
<!-- start body-->
<?php if(is_page('Home')){
echo'<div id="headerImage">';
}else{
echo'<div id="headerImage" class="noImage">';
};?>
with the
.noImage{display:none:}
so if the page is home, it will display the image, but otherwise it should take it out. Am sure some smarter bear can improve on this code. & of course wrap your image in a div, in this case i called it headerImage
D
write this code in header.php file
<?php
if ( is_front_page() )
{ ?>
//put your html code of front page header
<?php } else
{ ?>
//put your html header code of other pages
<?php } ?>
thank you Will give it a try Technicalbuddy
D
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.