Display Static Block in Phtml file and CMS page in magento 2

Please check the following steps.

1. Add the following code in XML file.
block_identifier

2. Add the following code in Phtml file.
<?php echo $this->getLayout()->createBlock('MagentoCmsBlockBlock')->setBlockId('block_identifier')->toHtml();?>

3. Add the following code in CMS Content.
{{block class="Magento\Cms\Block\Block" block_id="block_identifier"}}
Pritesh Pritesh

Pritesh Pethani

Request a Quote!!

Share your concept and we will return to you within 24 hours. Let us work out the best software solution for you!

Let's Start
Whatspp