cancel
Showing results for 
Search instead for 
Did you mean: 

Header logo is not changing after applying a child theme ?

Header logo is not changing after applying a child theme ?

Hi guys,I created a child theme by changing theme.xml and registration.php and I applied theme at backend and I changed header logo and cleared cache. But I could not see any header logo change in frontend. What is the reason? Can anyone help me ?
3 REPLIES 3

Re: Header logo is not changing after applying a child theme ?

 

@bharath553

 

Can you share your child theme code for better understand and also it might be possible there is problem in your theme.

 

Check this link theme logo not changing in magento-2 custom-theme

If Issue Solved, Click Kudos/Accept As solutions.

Re: Header logo is not changing after applying a child theme ?

In your admin open the theme configurations select your desired theme "STORES > Configuration > Design > Header (Click Choose file and select your logo)" and add your logo file and save your theme.

(OR) 

Open your theme directory and check the following file "default.xml" is updated as below listed

app/design/frontend/vendor_Name/theme_Nmae/Magento_Theme/layout/default.xml

 

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="logo">
            <arguments>
                <argument name="logo_file" xsi:type="string">images/my_logo.png</argument>
                <argument name="logo_img_width" xsi:type="number">300</argument>
                <argument name="logo_img_height" xsi:type="number">300</argument>
            </arguments>
        </referenceBlock>
    </body>
</page> 

 

Re: Header logo is not changing after applying a child theme ?

In your admin open the theme configurations select your desired theme "STORES > Configuration > Design > Header (Click Choose file and select your logo)" and add your logo file and save your theme.

 

Open your theme directory and check the following file "default.xml" is updated as below listed

app/design/frontend/vendor_Name/theme_Nmae/Magento_Theme/layout/default.xml

<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="logo">
            <arguments>
                <argument name="logo_file" xsi:type="string">images/logo_new.png</argument>
                <argument name="logo_img_width" xsi:type="number">300</argument>
                <argument name="logo_img_height" xsi:type="number">300</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>