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 !


2 Answers 2


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

Step 1 :

in Admin go to


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="-">
                <argument name="block_id" xsi:type="string">header-text-info</argument>
  • 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.

  • 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 Sep 27, 2018 at 16:34
  • you can change its location by changing the "after.body.start" to "header.panel" and change before="-" to after="logo" Sep 27, 2018 at 16:36
  • worked ! thanks ! @Naveed Asim But do u know the name of the panel where search bar is ? Sep 27, 2018 at 16:59
  • you will find it, in /vendor/magento/module-search/view/frontend/layout/default.xml. Sep 27, 2018 at 17:01

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"


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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