Assign a different logo to a page
-
Im trying to add a different logo to just one page on my site. I’ve managed to add it but it also adds it on top of the main logo for the other pages. Im thinking i need to add some php if else function but I have never done this before and am struggling to figure it out via the internet. So far i have added
Style.css
.page-id-901 #logo {display:none;}
.page-id-901 #newlogo { background: url(“https://localhost:8888/entersitenamehere/wp-content/uploads/2014/05/test.jpg”) no-repeat scroll 0 0 transparent; float:left;
}also i have added the newlogo info like this under logo into style.css
#logo{
width: 31.91489361702128%;
float:left;
padding-top:10px;
margin-right:4.25531914893617%;
margin-bottom: 20px;
}img.logo{
display: block;
left: 0;margin-top:20px;
}#newlogo{
width: 31.91489361702128%;
float:left;
padding-top:10px;
margin-right:4.25531914893617%;
margin-bottom: 20px;
}img.newlogo{
display: block;
left: 0;margin-top:20px;
}in header.php i have:
<div id=”header” class=”clearfix”><div id=”logo”>
“>
<?php if ( of_get_option(‘pb_logo’) ) { ?>
<img class=”logo” src=”<?php echo of_get_option(‘pb_logo’); ?>” />
<?php } ?>
<p><?php bloginfo(‘description’); ?></p></div><!– #logo –>
<div id= “newlogo”>
<img src=”https://localhost:8888/entersitenamehere/wp-content/uploads/2014/05/test.jpg” />
</div>This gives me the new logo on the page I want which is great but how do I stop it coming out on top of the logo for the other pages.
Any help would be appreciated. I usually only attempt basic code ??
- The topic ‘Assign a different logo to a page’ is closed to new replies.