0

Where is located the file of the header of luma theme ?

I want to add some text and facebook icon to header and I can´t find where I do that !

Please Help !

Thanks

1

Create CMS static block(s) and add these in your theme default.xml file :

Step 1 :

in Admin go to

Content->Elements->Blocks

create CMS block there and add its identifier header-text-info and in Package/theme/Magento_Theme/lahyout/default.xml file add below code after tag :

Step 2:

<referenceContainer name="after.body.start">
    <container htmlClass="header-text" htmlTag="div" name="ship.notice.col-12">
        <block class="Magento\Cms\Block\Block" name="header.notice.text" before="-">
            <arguments>
                <argument name="block_id" xsi:type="string">header-text-info</argument>
            </arguments>
        </block>
    </container>
</referenceContainer>
  • And after that flush your cache,

    like that you can add header text or whatever info you want i.e facebook icon , phone number etc. This block will show at top of your site.

| improve this answer | |
  • it works ! But actually at the top of site and I want by side of the logo. at the top of navigation bar @Naveed Asim – user6505433 Sep 27 '18 at 16:34
  • you can change its location by changing the "after.body.start" to "header.panel" and change before="-" to after="logo" – Naveed Asim Sep 27 '18 at 16:36
  • worked ! thanks ! @Naveed Asim But do u know the name of the panel where search bar is ? – user6505433 Sep 27 '18 at 16:59
  • you will find it, in /vendor/magento/module-search/view/frontend/layout/default.xml. – Naveed Asim Sep 27 '18 at 17:01
0

Header and footer are in the html folder of the theme.

Check "vendor/magento/module-theme/view/frontend/templates/html/header.phtml" or "vendor/magento/module-theme/view/frontend/templates/html/header/logo.phtml"

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.