In this post I am going to explain how to to call CMS static block in phtml file.
Use below code snippet to get CMS static block content in any template file.
echo $this->getLayout()
->createBlock('Magento\Cms\Block\Block')
->setBlockId('cms_static_block_identifier')
->toHtml();Thats it. Enjoy Magento 2!!
Write an article about ecommerce that help people to grow their ecommerce business. You’ll find best ecommerce guide, news, tips & more!


May 6, 2020 at 2:55 pm
Thank you for the information you wrote.