I want to create static block in Magento 2.3.5 and call that block in footer content. please anyone can have idea then please share with me.
Thank you in Advance.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityIf you want to call static block in the phtml file then please add below code.
<?php
echo $this->getLayout()
->createBlock('Magento\Cms\Block\Block')
->setBlockId('YOUR_BLOCK_ID')
->toHtml();
?>
If you want to add it in the CMS page then please add below code.
{{block class="Magento\\Cms\\Block\\Block" block_id="YOUR_BLOCK_ID"}}
And if you want to add through XML then please add below code.
<referenceContainer name="content">
<block class="Magento\Cms\Block\Block" name="YOUR_BLOCK_ID">
<arguments>
<argument name="block_id" xsi:type="string">YOUR_BLOCK_ID</argument>
</arguments>
</block>
</referenceContainer>
Happy Coding.
You can add in footer_links block
<referenceBlock name="footer_links">
<block class="Magento\Framework\View\Element\Html\Link\Current" ifconfig="catalog/seo/search_terms" name="search-term-popular-link">
<arguments>
<argument name="label" translate="true" xsi:type="string">Search Terms</argument>
<argument name="path" xsi:type="string">search/term/popular</argument>
</arguments>
</block>
</referenceBlock>