I have extended LUMA theme and want to customize header.

I want to add static block before logo and want to move logo to center of page which is on left side.

Final result will be

[1] static block [2] logo (in center) [3] Search form (this is already on correct position).

Please advice how to achieve this.

2 Answers 2


You can do this by putting DIV over your logo and search box

Also create a "container" for your static block (inside this you can call your static block) in logo.phtml.

Now assign a class to each container and give them required width and float them accordingly .

So it will look like 1) Static block 2) Logo 3) Search

I hope someone else will get idea from here , as I am posting late on question .


you use referenceBlock logo

<referenceBlock name="logo">
        <block class="Magento\Cms\Block\Block" name="test_links">
           <argument name="block_id" xsi:type="string">test_links</argument>
  • Where to add this. I have also extended LAYOUT and this should be added in layout/default.xml (i think)
    – Jarnail S
    Commented Dec 8, 2016 at 8:02
  • @Jai yes default will do that. Commented Dec 8, 2016 at 9:10
  • Added static block with "testblock" identifier in admin. Added above lines replacing testblock in default.xml. Deployed, Upgraded, flushed but but didint work :(
    – Jarnail S
    Commented Dec 8, 2016 at 9:29
  • did you add <body></body> tag Commented Dec 8, 2016 at 9:41
  • Yes .Here is all code of extended default.xml: <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="logo"> <block class="Magento\Cms\Block\Block" name="testblock"> <arguments> <argument name="testblock" xsi:type="string">testblock</argument> </arguments> </block> </referenceBlock> </body> </page>
    – Jarnail S
    Commented Dec 8, 2016 at 9:50

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.