I am no getting why this code here (https://www.ads-software.com/support/topic/how-to-set-different-logo/) doesn’t work on my website.
As you can see on the like to my page that I provided, the logo appears transparent or white because is the same as the homepage. So I want to have a different logo on the page entrada. COuld you people help me with that please?
I would prefer to do this using CSS as I don’t want to make it in functions.php.
Thank you a lot people!
]]>Here is the coding:
<div class="mh-site-identity"> <div class="mh-site-logo" role="banner" itemscope="itemscope" itemtype="https://schema.org/Brand"></div> </div>
Any help is appreciated.
]]>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
Please could you give me some advice on how I:
Im using the enfold theme which can be found on themeforest. Im using the latest version of wordpress. I cant write PHP but I understand HTML + CSS and I understand the logic behind PHP,MYSQL so can make alterations, insert code samples and so on.
I appreciate your time in helping me with this and hopefully someone else might find this post useful also.
Cheers
]]><div class="logo">
<?php if(of_get_option('logo_type') == 'text_logo'){?>
<?php if( is_front_page() || is_home() || is_404() ) { ?>
<h1><a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('description'); ?>"><?php bloginfo('name'); ?></a></h1>
<?php } else { ?>
<h2><a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('description'); ?>"><?php bloginfo('name'); ?></a></h2>
<?php } ?>
<?php } else { ?>
<?php if(of_get_option('logo_url') != ''){ ?>
<a href="<?php bloginfo('url'); ?>/" id="logo"><img src="<?php echo of_get_option('logo_url', "" ); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('description'); ?>"></a>
<?php } else { ?>
<a href="<?php bloginfo('url'); ?>/" id="logo"><img src="<?php bloginfo('template_url'); ?>/images/logo.png" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('description'); ?>"></a>
<?php } ?>
<?php }?>
<p class="description"><?php bloginfo('description'); ?></p>
</div>
i need to change the logo of a particular page with other logo. tried the code
<?php $page_id=get_the_ID();
if(is_page()) { $image='head-image-'.$page_id.'.png'; };
if(!file_exists(TEMPLATEPATH.'/images/'.$image)) { $image='logo.png'; }
echo '<img src="'.get_bloginfo('template_url').'/images/'.$image.'"/>'; ?>
but the logo is not shown on categories and posts
Thanks.
]]>