---
title: "How to Show Cms Static Block From Template phtml File in Magento 2?"
url: "https://magecomp.com/blog/cms-static-block-from-template-phtml-file-in-magento-2/"
date: "2021-06-09T11:14:09+00:00"
modified: "2025-01-29T11:05:25+00:00"
author:
  name: "Dhiren Vasoya"
  url: "https://magecomp.com/"
categories:
  - "Magento Tutorials"
word_count: 238
reading_time: "2 min read"
summary: " Hey, Magento buddies "
description: "CMS Static Blocks are an excellent way to display various information to your consumer. Calling Static CMS block using phtml consumes less time. Learn How to..."
keywords: "Magento Tutorials"
language: "en"
schema_type: "Article"
related_posts:
  - title: "Guide to Implement Autocomplete Address Field in Magento 2"
    url: "https://magecomp.com/blog/autocomplete-address-field-magento-2/"
  - title: "Configuration of VAT ID Validation in Magento 2"
    url: "https://magecomp.com/blog/configure-vat-id-validation-magento-2/"
  - title: "How to Configure Locale Option and Store Configurations in Magento 2"
    url: "https://magecomp.com/blog/locale-option-and-store-configurations-in-magento-2/"
---

# How to Show Cms Static Block From Template phtml File in Magento 2?

_Published: June 9, 2021_  
_Author: Dhiren Vasoya_  

![How-to-Show-Cms-Static-Block-From-Template-phtml-File-in-Magento-2](https://magecomp.com/blog/wp-content/uploads/2021/06/How-to-Show-Cms-Static-Block-From-Template-phtml-File-in-Magento-2-png.webp)

Hey, Magento buddies**
 In today’s learning tutorial, we will learn about How to Show Cms Static Block From Template phtml File in Magento 2.
CMS Static Blocks are an excellent way to display various information to your consumer. CMS Static Blocks help to get more consumer’s attention to specific products and also make your Magento 2 store or website more attractive. You can show CMS Static Blocks practically on each and every page of your Magento 2 website and Magento 2 store.
If you don’t want to consume too much time in configuring CMS Static Block, then you can call CMS Static Block in phtml or by using XML file layout. Let’s go step by step.
## Steps to Show Cms Static Block From Template phtml File in Magento 2
**Step 1:** Add the below code in your phtml file when you show Static block
```
<?php
         echo $this->getLayout()
        ->createBlock(MagentoCmsBlockBlock::class)
        ->setBlockId('block_identifier_here')
	->toHtml();
	//change  block_identifier_here with Your CMS Block Identifier
?>
```

**Step 2**: Add below code CMS static block in your CMS page.
```
{{block class="Magento\Cms\Block\Block" block_id="block_identifier_here"}}
```

## Final words
So, in this tutorial article, we learn How to Show Cms Static Block From Template phtml File in Magento 2. If any confusion occurs, feel free to reach us via the comments. Share it with your Magento buddies.
**Happy learning!**


---

_View the original post at: [https://magecomp.com/blog/cms-static-block-from-template-phtml-file-in-magento-2/](https://magecomp.com/blog/cms-static-block-from-template-phtml-file-in-magento-2/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-07-27 13:18:01 UTC_  
