Jump to content

How to add an additional logo in the header on all pages? Wordpress


Go to solution Solved by LooInSpain,

Recommended Posts

Hi, I have such a problem, I'm looking for help. I'm upgrading the site http://www.euroweldgroup.lt/. I encountered a problem in the header. There are 3 logos on the main page. Basic EWC and additional SUFRA, BELFINGROUP with links. But when I go to another page (in the navigation menu) the additional logs disappear. How can I make logos all the time on other sites? Theme I have MAXIMA. Please help!

 


 

The code is in the attachment 

 

 

 

The code is in the attachment

theme header header.php

theme header.php.txt

  • Solution

On line 165 instead of:

if ( is_front_page() ){
echo '<h1><a href="'; 
echo home_url();
echo '"><img src="' . $logo_attachment . '" alt="' . $alt_text . '"/></a>
<a href="http://www.sufra.lt" target="_blank"><img src="http://www.euroweldgroup.lt/wp-content/uploads/2016/11/sufra_logo1.png" alt="Sufra"/></a>
<a href="http://Belfingroup.com" target="_blank"><img src="http://www.euroweldgroup.lt/wp-content/uploads/2016/11/belfingroup_logo.png" alt="Belfingroup"/></a>
</h1>';

}else{
echo '<a href="'; 
echo home_url();
echo '"><img src="' . $logo_attachment . '" alt="' . $alt_text . '"/></a>';

}

change to this:

echo '<h1><a href="'; 
echo home_url();
echo '"><img src="' . $logo_attachment . '" alt="' . $alt_text . '"/></a>
<a href="http://www.sufra.lt" target="_blank"><img src="http://www.euroweldgroup.lt/wp-content/uploads/2016/11/sufra_logo1.png" alt="Sufra"/></a>
<a href="http://Belfingroup.com" target="_blank"><img src="http://www.euroweldgroup.lt/wp-content/uploads/2016/11/belfingroup_logo.png" alt="Belfingroup"/></a>
</h1>';

So essentially remove the if (is_front_page()) { and the else

That should fix your problem

Edited by LooInSpain
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.