First Approach:

By default Avada does not provide the ability to upload a different logo for a specific page. A user can only upload a global logo in the Theme Options -> Logo section which cannot be sufficient in some situations where a user wants to upload a different logo for a specific page. With the help of this tutorial, you’ll be able to upload a different logo for your page other than the Global logo which comes from Theme Options. The good thing in the process is, Avada theme provides an option to use Custom CSS in the Fusion Builder of each page so you can get this done easily.

First you need to remove the global logo from the specific page and below CSS can be used in the Fusion Builder CSS area of your page where you want a different logo.

 

Copy to Clipboard

 

Once done, you need to install and activate a child theme in your website and edit the functions.php file by going to Dashboard -> Appearance -> Editor section. Then paste the below code at the very bottom of the functions.php file.

 

Copy to Clipboard

 

Now before saving the changes in there, you need to get the ID of your page, update the anchor link and the image link of the above code to your own ones. The ID should be of the page for which you want the different logo and a quick way to get the ID is to edit that specific page and you’ll see the numeric page ID number in the browser address bar.

Once you have made changes to Page ID, anchor link and the image source, save the changes in the functions.php file and you’ll see the changes taking effect. The logo will be now replaced with the image that you used in the code and the global logo of Avada will be removed.

Second Approach:

Just create a custom header for your page, if you’re using 7.0+ version of Avada and dive into the unlimited possibilities.

How To Build A Custom Header – https://theme-fusion.com/documentation/avada/layouts/how-to-build-a-custom-header/

Pre-built Headers For Layouts – https://theme-fusion.com/documentation/avada/layouts/prebuilt-headers-for-layouts/

 

No Comments

  1. Andrea January 17, 2019 at 12:58 pm - Reply

    Great snippet very usefull trick
    I used and works perfectly
    I am not a programmer
    but I have 2 issue to solve
    1 – how to change the logo on sticky menu
    2 – if i want change logo on portfolio single page image I have to change this if(is_page( ’43’ )) in something else, isn’t it?

    thanks in advance

    • Andrea March 2, 2019 at 10:56 pm - Reply

      If apply your snippet the sticky menu does’t work any more ;(

  2. Francesca January 29, 2019 at 11:28 pm - Reply

    Perfect! the code works great but, maybe, it creates a conflict with fusion Slider, it doesn’t load. is it possible?

    Thanks

    • Muhammad Hassan Tariq February 22, 2019 at 1:07 am - Reply

      Very unlikely that will be caused by this code. Fusion slider may have its own problem like missing width/height OR may be a JavaScript error is breaking it. You can check the browser console for that.

  3. Josh February 26, 2019 at 12:45 am - Reply

    The css you mentioned above doesn’t remove the existing logo. Now I have two logos on my home page. Also how do I change logo on sticky header?

  4. Brandon March 27, 2019 at 12:58 am - Reply

    This is exactly what I’ve been looking for, thank you!

    One quick question: I’m trying to do this on multiple pages… and it works on the first page only.

    The formatting is

    if(is_page( ‘280’,’364′ ))

    but only page 280 works, not 364. How would I get this fix on multiple pages?

    Thanks!

    • Luka April 11, 2019 at 2:09 am - Reply

      You can use this: if( is_page( array( 280, 364 ) ) ) instead of what you had.

      • Muhammad Hassan Tariq April 12, 2019 at 12:37 am - Reply

        Thank you Luka :-)

  5. Justyna April 23, 2019 at 12:54 am - Reply

    Hi, I have the same size picture of the global logo and the one for a different page. Somehow the global logo is much smaller (the size what I want) than the logo what I have using the above code….

    Please advise

    • Muhammad Hassan Tariq April 24, 2019 at 12:05 am - Reply

      The likely issue would be your image dimensions. If you are using any Retina logo then please make sure that is exactly twice the size of your original logo.

      • Justyna April 24, 2019 at 1:19 am - Reply

        Thank you, yes that was the problem. Worked great thanks

  6. Justyna May 19, 2019 at 5:14 pm - Reply

    After the new update of Avada theme. My logo disappeared :( do you know what could caused that?

    • Muhammad Hassan Tariq May 19, 2019 at 9:22 pm - Reply

      Can you share the URL of the page where its not working? To reply privately, please submit the form on Contact page of this website.

  7. Apostolos May 31, 2019 at 4:14 pm - Reply

    Hello I am using the quad menu plugin in my site and I have tried this solution but it still shows the normal logo.
    I was wandering if I need to follow a different solution with quad menu

    • Muhammad Hassan Tariq June 1, 2019 at 4:53 pm - Reply

      I don’t think a menu will be relevant to this because its a completely issue. Normal menu will be removed only when you will use the CSS I gave in the solution.

  8. sshattersley June 1, 2019 at 4:15 am - Reply

    Hi Muhammad,

    Thanks for writing this up! What I put in the parts adds onto my domain url which results in an error. So for example if I put https://website.com, when you click on the link it comes out as:

    “https://website.com/https://website.com”

    Do you know how to fix this?>

    • sshattersley June 1, 2019 at 4:17 am - Reply

      Sorry, for the above I meant for the a-href link

      • Muhammad Hassan Tariq June 1, 2019 at 4:50 pm - Reply

        Please make sure that the URL is added properly inside the href. If you can share the exact code you are using, I will be able to point out what is wrong in it.

        Thank you.

  9. Venkat June 4, 2019 at 3:02 pm - Reply

    Hi Muhammad,

    I had set both the standard logo and mobile logo through Avada theme options. The images are displayed based on the devices correctly but both images gets downloaded in the background. I would like to dynamically set the logo based on devices so that only one image is used. Please let me know how to achieve this.

    • Muhammad Hassan Tariq June 4, 2019 at 3:09 pm - Reply

      Sorry, the loading of the logos cannot be avoided, they will be hidden though but not completely removed from HTML markup.

      • Venkat June 4, 2019 at 3:18 pm - Reply

        Hi Muhammad,

        Thanks for your quick reply. Can I remove the logo from Avada theme options and is there a way to add this dynamically?

  10. Adam June 16, 2019 at 7:40 pm - Reply

    Hi, thank you so much for this!

    Just one question: if i need 2 pages with 2 different logos, lets say my main logo is grey, but i need one in red and one in green – can i just copy and rename the function?

    I got one logo to work, but the second stays blank somehow

    • Muhammad Hassan Tariq June 21, 2019 at 8:44 am - Reply

      Yes, that is possible, you simply need to copy and change the function name and it will work. If its not working then provide the exact code and I’ll look into it.

      Thank you

  11. Charles June 23, 2019 at 9:13 pm - Reply

    Does this also change our x2 logo for Retina display? Or should we use an additional code for that?

    Thanks and great code!

  12. Nelson July 2, 2019 at 8:41 pm - Reply

    Woooo… That’s what I was looking for…!
    Thank you Muhammad

  13. lor July 9, 2019 at 2:03 pm - Reply

    i have a problem with the code, this the error:
    Le tue modifiche al codice PHP sono state annullate a causa di un errore alla linea 771 del file wp-content/themes/Avada/functions.php. Correggi e prova a salvare nuovamente.
    Cannot redeclare logo_image_home() (previously declared in wp-content/themes/Avada-Child-Theme/functions.php:15)

    • Muhammad Hassan Tariq July 13, 2019 at 12:37 pm - Reply

      Actually you may have two functions named logo_image_home() in the same functions.php file. You may want to change the name of one of the function.

  14. Ron July 13, 2019 at 12:09 am - Reply

    Not sure what I’m missing, but it must be something. So great you wrote this up to help people … maybe you can see what I’ve missed? This is the code I’ve put in the child functions.php:

    add_action( ‘avada_logo_prepend’, ‘logo_image_home’ );
    function logo_image_home() {
    if(is_page( ‘611’ )) {
    echo ‘‘;
    }
    }

    • Ron July 13, 2019 at 12:16 am - Reply

      and it’s Avada v 5.7.2 if that makes any difference

    • Muhammad Hassan Tariq July 13, 2019 at 12:33 pm - Reply

      Actually you are echoing only an anchor tag without any text so there is no image or text. You will have to use an image HTML tag instead for displaying an image like my example. Notice the complete line #4 of my code above.

  15. Ron July 15, 2019 at 8:09 pm - Reply

    It looks like the past of my code removed the echo part. Let me give it another shot.


    add_action( 'avada_logo_prepend', 'logo_image_home' );
    function logo_image_home() {
    if(is_page( '611' )) {
    echo '';

    if that didn’t work, this is the echo with syntax removed hoping it gets by

    echo

  16. Ron July 15, 2019 at 8:11 pm - Reply

    okay, looks like both didn’t show the echo, so you can go to http://7oah.com/code.txt to see it

    • Muhammad Hassan Tariq July 15, 2019 at 8:22 pm - Reply

      I am getting the echo content fine in my back-end. So content is correct and its supposed to work. Make sure your child theme is active. I don’t see it active on your website.

  17. Ron July 16, 2019 at 2:39 am - Reply

    so weird! I did activate that thing but it wasn’t when I looked. I appreciate your help!!

    • Muhammad Hassan Tariq July 16, 2019 at 11:29 am - Reply

      No Problem :-)

  18. Martin Veselý July 27, 2019 at 1:10 pm - Reply

    Hello,

    It works as it should but only on normal pages. But I also need it to work on product page (Woocommerce product page).

    I inserted this code in functions.php:

    add_action( ‘avada_logo_prepend’, ‘logo_image_home’ );
    function logo_image_home() {
    if(is_page(array(‘11319’, ‘11284’, ‘11249’))) {
    echo ‘‘;
    }
    }

    The product page is ID: ‘11284’, but for some reason it does not work on this page.

    Please help me solve this issue.
    Thank you.

    • Muhammad Hassan Tariq July 27, 2019 at 1:42 pm - Reply

      Martin, you will have to use the is_product function for the products -> https://docs.woocommerce.com/wc-apidocs/function-is_product.html

      • Martin Veselý July 27, 2019 at 4:24 pm - Reply

        Thank you for your help.
        So I tried this code:

        add_action( ‘avada_logo_prepend’, ‘logo_image_home’ );
        function logo_image_product() {
        if(is_product(‘11284’)) {
        echo ‘‘;
        }
        }

        But it still does not work. It is still the same as without this code.
        Do you know where could be the problem?

        • Muhammad Hassan Tariq July 29, 2019 at 7:56 pm - Reply

          In your code content, I don’t see the image HTML tag but only the anchor HTML. Please make sure to add the image HTML tag too within the anchor HTML.

  19. Mike July 30, 2019 at 7:53 pm - Reply

    Thanks. I got the code to work for the normal header but when I scroll to activate the sticky header, the logo disappears. How can I change the logo for the sticky header to match the new logo on the home page?

    • Muhammad Hassan Tariq July 31, 2019 at 9:22 pm - Reply

      The code is supposed to work for Sticky Header too. Are you able to share the exact URL where I can see the set up so I can see if there is something obvious.

      • Mike July 31, 2019 at 9:35 pm - Reply

        Hi Muhammad, can I send you a private message?

  20. Marco July 31, 2019 at 9:05 pm - Reply

    Hi Muhammad thanks for this helpful guide!

    Not being a developer, my problem is that I don’t know how to fill the last line (the 4th) line of the second code in functions.php. I just know my the image link and not even sure where to put it. And what about the anchor link?
    In other words i don’t know how to fill those 3 fields

    href=
    src=
    data-orig-src=

    thanks in advance!

    • Muhammad Hassan Tariq July 31, 2019 at 9:21 pm - Reply

      Actually href will use the actual anchor link to which the image will be linked, while other two fields will use the exact link to the image file so just fill those with the relevant URLs.

      • Marco August 1, 2019 at 1:30 pm - Reply

        I want to apply it to a single page and to all my portfolio pages so I tried this both specifing the IDs of the portfolio:

        if((is_page( ’11’ )) || (is_archive()is_post_type_archive(array(146, 2433, 2533, 2594, 2738, 2813)))) {

        and without specifing IDs (because i want to apply it for all the portfolio pages):

        if ((is_page( ’11’ )) || (is_archive())) {

        But it doesn’t work for page . Only the page 11. I really can’t understand why.

        • Marco August 1, 2019 at 1:41 pm - Reply

          sorry the first line of code was

          if((is_page( ’11’ )) || (is_archive(array(146, 2433, 2533, 2594, 2738, 2813)))) {

          by the way I also tried “is_post_type_archive” instead of “is_archive” but nothing

  21. Marco July 31, 2019 at 9:48 pm - Reply

    Thanks a lot Muhammad! that’s exactly what I was looking for! You’re more efficient and quicker than any other paid customer support in the world :)

  22. Mike August 1, 2019 at 2:27 pm - Reply

    For anyone who is trying to have a different logo on a page while keeping the same logo on the sticky header for that page, I used the css image filter “invert” to change a black text logo (used throughout the site) to a white text logo used only on the home page.

    Place this code in the custom CSS field for the page:

    img.fusion-standard-logo {
    -webkit-filter: invert(1); /* Safari 6.0 – 9.0 */
    filter: invert(1);
    }

    This is an alternative to using Muhammad’s excellent code here, which unfortunately doesn’t allow you to choose a different sticky logo versus standard logo for the page–as the Avada theme does overall.

  23. Marco August 2, 2019 at 1:08 pm - Reply

    Does anybody know what is the correct wordpress conditional tag for a portfolio post (not a page)?

  24. Marco August 2, 2019 at 1:15 pm - Reply

    If anybody has the same problem “is_single( int|string|array $post = ” )” works fine for any post type, except attachments and pages

  25. Andy August 23, 2019 at 2:57 am - Reply

    Hi,

    This worked perfectly! Thank you.

    But is it possible to apply exactly the same to the flyout menu?

    Cheers,
    Andy

  26. Selim August 23, 2019 at 10:48 am - Reply

    Hi Muhammed! Thanks for the great solution.

    I did what you did, but I have a problem which seems a bit confusing.

    When I on fusion builder live frame, my logo appears perfectly and without any problem but when I switch mode to front-end mode, my logo disappears.
    Why should it be?

    Thanks again!

    • Muhammad Hassan Tariq August 29, 2019 at 12:19 am - Reply

      I’m not sure of that, I’ll have to check if its compatible with the Front-end Builder.

  27. Anthony August 28, 2019 at 9:13 pm - Reply

    Hi,

    This has been a saviour for me thanks!

    How do I show the retina logo in the code as the mobile is showing slightly blurry and the retina one always fixes it when applied through the AVADA options tab.

  28. Koen September 18, 2019 at 1:15 pm - Reply

    you are a superstar. Thanks heaps mate

    • Muhammad Hassan Tariq September 18, 2019 at 1:19 pm - Reply

      You’re welcome :-)

  29. May October 1, 2019 at 6:28 pm - Reply

    What if I only need to change the mobile header logo? what’s the php code?

  30. Remi October 2, 2019 at 8:39 pm - Reply

    Hi,

    Can you help me with my code? I can’t get the new logo visible. Here is my code:

    add_action( ‘avada_logo_prepend’, ‘logo_image_home’ );
    function logo_image_home() {
    if(is_page( ‘979’ )) {
    echo ‘‘;
    }
    }

  31. Jonh October 24, 2019 at 12:29 am - Reply

    Good day!
    Muhammad, please help me.
    I need to make a different logo on the site pages that are under site.com/ua/
    How to do it?

    I did php, but this don’t work on mobile version – link on code – https://codeshare.io/aVqrEQ and here – https://www.dropbox.com/s/p63z6syp90zmad1/logo.php?dl=0

  32. Pam November 7, 2019 at 3:37 am - Reply

    This is great. I was able to set a different logo (white text) on the home page. Unfortunately, I need to keep the same logo (black text) as the rest of the site for the sticky header and mobile. Is this possible? thanks!

  33. Mike December 3, 2019 at 7:15 pm - Reply

    … great job, Muhammad!

    The only thing we still need, is the possibility to change the logo for/in the sticky header.
    We need another logo image for/in the sticky header, stead the standard logo.

    Have you an workaround for this case?

    Thanks for your quickly help.

    • Stevan January 31, 2020 at 3:11 pm - Reply

      I completely agree. How do we change the sticky header logo?

  34. Chris December 12, 2019 at 5:47 pm - Reply

    Hi Muhammed,

    Great article and well thought out especially having the download of the child theme as a download. I have a little update to add if thats okay as I also was having trouble like a couple of other users with the Sticky Menu no longer working after addin in the code. After a little debugging I realised I needed to add the following retina_logo_url=”” withiin the img tag eg=> echo ‘‘;

    Without it the browsers were throwing javascript errors.

    Hope this helps.

    thanks

    Chris
    codehub200

  35. Karie January 15, 2020 at 12:34 am - Reply

    Thank you for sharing this code. I was able to get it to work perfectly on Pages. It does not work on posts, however. Could you tell me what modifications would need to be made to the code to get it to work with Posts as well as Pages?

    Thanks in advance!

  36. Andrew February 14, 2020 at 12:22 am - Reply

    Thanks for some really useful code but it seems like so many people are asking the same question about the sticky logo.

    I only need this action to work on my main header logo and I would like to keep the sticky logo as is but the css you suggest to insert in the firast instance removes it. How is it possible for me to change only the main logo and leave the sticky logo as is?

  37. Tacocat February 18, 2020 at 7:03 pm - Reply

    Hello there,
    I am trying to change the logo on different portfolio posts, but the code is not working, should it be a different value than if_page or what? :(

  38. Rob L.M. May 8, 2020 at 8:43 pm - Reply

    Hi, i think that is possible to hide logo on all pages with only one css instruction in Avada Theme Options -> Custom CSS section.

    Just add this (and change the ID’s for yours own):

    /* Example for hide logo in more than one page */
    .page-id-14249 .fusion-logo > a.fusion-logo-link, .page-id-14250 .fusion-logo > a.fusion-logo-link,
    .page-id-14251 .fusion-logo > a.fusion-logo-link, .page-id-14252 .fusion-logo > a.fusion-logo-link,
    .page-id-14253 .fusion-logo > a.fusion-logo-link, .page-id-14260 .fusion-logo > a.fusion-logo-link,
    .page-id-14263 .fusion-logo > a.fusion-logo-link, .page-id-14265 .fusion-logo > a.fusion-logo-link,
    .page-id-14284 .fusion-logo > a.fusion-logo-link, .page-id-14309 .fusion-logo > a.fusion-logo-link
    {
    display: none !important;
    }

    In addition, is possible to change the logo for all pages using an array in is_page function:

    function logo_image_home() {
    if(is_page( array(‘14254′,’14255′,’14256′,’14257′,’14258′,’14261′,’14264′,’14266′,’14287′,’14314′,’14249′,’14250′,’14251′,’14252′,’14253′,’14260′,’14263′,’14265′,’14284′,’14309’) )) {
    echo ‘‘;
    }
    }

    I think that is possible to store this array in post snippet or similar and capture it from functions.php. In this way, you can add more pages for change logo touching functions.php only one time.

    Best regards, people!.

  39. Adrian June 6, 2020 at 2:57 am - Reply

    I’ve got round the sticky menu problem using media queries, you would have to adjust the margin-top value to match the height of the logo

    @media only screen and (min-width: 1051px) {
    .home .fusion-logo > a.fusion-logo-link {
    display: none !important;
    }
    }

    @media only screen and (max-width: 1050px) {
    .home .fusion-logo > a.fusion-logo-link {
    display: block;
    margin-top: -80px !important;
    }
    }

    If this is poor coding please improve it for me!

  40. Adrian June 6, 2020 at 3:00 am - Reply

    ignore last post, I was confusing this with the mobile menu

  41. Germain August 17, 2020 at 9:46 pm - Reply

    Hi,
    I am trying to set a logo different to the default to an other page, but In vain. I have put the CSS on the page. I installed Avada Child and set the CSS but still the logo is not coming up. Could anyone help. Thanks.

  42. Germain August 21, 2020 at 1:59 pm - Reply

    Hi,
    How can change the setting (title background color, and also the padding) of the Event Calendar widget. Could anyone help`?
    Germain

  43. Noah September 14, 2020 at 11:37 am - Reply

    Hi there, may I ask what cause my logo disappeared after new update?

    • Muhammad Hassan Tariq December 31, 2020 at 11:14 pm - Reply

      Can’t be sure about that but you should go with the second approach that I mention in my updated post, it will be update proof and long lasting.

Leave A Comment