This topic has 16 replies, 5 voices, and was last updated 10 years, 2 months ago ago by Eva Kemp
Hi all, as written in the subject I wonder how I can manage to set different logo images for different pages, i.e:
Home -> Default Logo
About -> About Logo
Contact Us -> Contact Us Logo
and so on…
Any ideas? I tried some plugins but I didn’t find any working solution. Thanks in advance for your answers.
Best Regards.
Hello,
Sorry, but in our theme you can add the logo only to the home page and to the fixed menu.
Navigate to Theme Options -> Header -> Logo image/Logo image for Fixed header.
Regards,
Robert Hall.
Not even by using conditional tags in header.php?
Of course, if you have good programming knowledge, you can edit header.php yourself and add logo.
We recommend you to use Child Theme for this.
Regards,
Robert Hall.
And this is what I’m trying to do by creating a template for a particular page, built on page.php and named “About”. So my template is customer-about.php. Instead of having get_header(); I wrote get_header(‘about’); because I created a file named header-about.php in which I replaced the etheme_logo(true); with an image. Why it doesn’t work? The website still shows the logo set through Option Tree.
Hello,
I think it’s more easier to use function is_page();
for condition in original header file.
For example:
if( is_page( 'some_page' ) ) {
// Echo 1st logo variant
} elseif ( is_page( 'some_another_page' ) ) {
// Echo 2nd logo variant
} elseif and so on...
Regards,
Jack Richardson
I’ll try again Jack, probably I wrote something wrong and the code you wrote didn’t work for me. I’ll keep you updated. Thanks for your reply.
EDIT: Nothing to do Jack, I post my code:
<div class="header-logo">
<?php if( is_page( 'home' ) ) {
echo ('etheme_logo(true)');
} else if ( is_page( 'about' ) ) {
echo "('<img src=\"<?php bloginfo('template_url'); ?>/images/logo_1.png\" >')";
} ?>
</div>
Hello,
Do you still need our help?
Please let us know.
Regards,
Eva Kemp.
Yes, please. I posted the code I wrote in header.php but it didn’t work. If you can give a look at it I’d appreciate it a lot. Thanks Eva.
Hello,
Could you please provide us with wp-admin and FTP credentials in Private Content?
Regards,
Jack Richardson
Sure, look at private content.
I gave you credentials 2 days ago but I didn’t see any change…
Hello,
Sorry for a long delay.
Unfortunately we were unable to log in to wp-admin panel using the credentials you provided.
Please give us the correct link and login details.
Thank you.
Regards,
Eva Kemp.
Hello,
First of all what is this echo "('<img src=\"<?php bloginfo('template_url'); ?>/images/logo_1.png\" >')";
?
You need to add
<div class="header-logo">
<?php if( is_page ('Home')){
echo etheme_logo(); }
elseif ( is_page('About')) {
echo "<img src='http://www.claudiofichera.it/wp-content/uploads/2012/06/CF_Title.png'>";
} ?>
</div>
If you want to change main logo, then you need to add it in header-structure file (royal/headers), not in header.php, because if you take a closer look at code in header.php file you’ll see that lines 81-83 display fixed header logo. Also don’t forget to create and use child theme to save your changes and avoid problems with next update.
Regards,
Olga Barlow
Hello and thanks for answering me:
The first string was an attempt to write HTML tags inside an ECHO command, including PHP code.
In any case, of course I created and activated a child theme and I did what you suggested but, unfortunately, it doesn’t work. Have you tried on a local wp install?
Thanks in advance for your support. Best Regards.
EDIT: It works! 🙂 thanks Olga for your precious tips!
Hello,
You’re welcome.
Regards,
Eva Kemp.
The issue related to '‘Different header logo for different pages’' has been successfully resolved, and the topic is now closed for further responses