I have created a new child theme from Luma. The admin panel recognizes that it’s registered and I have set it up to be used for my store.
One of the things I tried to achieve was changing the logo for a store, tried to define it in default.xml, and flushed the cache, but nothing changed on the frontend.
Afterward, I tried to insert a container with a block on top of the header, but also no sign of any changes.
What exactly I am doing wrong? Can’t seem to figure it out with just the help of Google.
Files structure
📦frontend
┣ 📂MyVendor
┃ ┗ 📂MyTheme
┃ ┃ ┣ 📂etc
┃ ┃ ┃ ┗ 📜view.xml
┃ ┃ ┣ 📂layout
┃ ┃ ┃ ┗ 📜default.xml
┃ ┃ ┣ 📂templates
┃ ┃ ┃ ┗ 📜top_message.phtml
┃ ┃ ┣ 📂web
┃ ┃ ┃ ┣ 📂css
┃ ┃ ┃ ┃ ┗ 📂source
┃ ┃ ┃ ┣ 📂fonts
┃ ┃ ┃ ┣ 📂images
┃ ┃ ┃ ┃ ┗ 📜my_logo.png
┃ ┃ ┃ ┗ 📂js
┃ ┃ ┣ 📜registration.php
┃ ┃ ┗ 📜theme.xml
┗ 📜.DS_Store
default.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header.container">
<container name="header.message.wrapper" htmlTag="div" htmlClass="header-message-wrapper">
<block name="header.message" template="MyTheme::top_message.phtml" class="MagentoFrameworkViewElementTemplate" />
</container>
</referenceContainer>
<referenceBlock name="logo">
<arguments>
<argument name="logo_file" xsi:type="string">
images/my_logo.png
</argument>
<argument name="logo_alt" xsi:type="string">
Awesome logo
</argument>
</arguments>
</referenceBlock>
</body>
</page>
top_message.phtml
<p>Free shipping for all orders.</p>