How to call static block in front end of site? Exact steps to display it by taking example of identifier: 'footer-link'

How can I do it?


2 Answers 2


you can call it like this.

{{block type="cms/block" block_id="footer-link"}} 

in cms -> homepage-> content

  • and if i want to add it on product Jun 8, 2017 at 13:18

You can reference static blocks within xml for pages like product pages:

    <referenceBlock name="product.info.main">
        <block class="Magento\Cms\Block\Block" name="product.staticblock" as="staticblock" >
                <argument translate="true" name="title" xsi:type="string">Footer Links</argument>
                <argument name="block_id" xsi:type="string">footer-link</argument>

Various blocks can be referenced depending on where you want your block to display.

Above XML should go in your theme within:


Or when within a module:


The below can reference a static block within phtml file within template:

echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('footer-links')->toHtml();

As suggested by Nikunj Vadariya to include static block from CMS use:

{{block type="cms/block" block_id="footer-link"}} 

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