Magento 2 CMS blocks are a great way to show different information to your customers. CMS blocks not only make your Magento 2 website more engaging but help you drive customers' attention to certain products, offers, or services. Static blocks are those pieces of content you can display practically on every page of your Magento 2 store.
In case you don't want to spend too much time going through the CMS block configurations you can call the CMS block in PHTML file or using the layout XML file. However, in this article, you will learn about the most common way to display the CMS block on Magento 2 page which is adding it with the help of widget. So, once you create the CMS block you're good to go.
Watch this short video to learn how to display CMS blocks on Magento 2 pages using a widget or follow the step-by-step instructions below:
In order to add new CMS Block via Magento 2 widget follow these steps:
1. Navigate to Content > Elements > Widgets and press the Add Widget button.
2. Choose the CMS Static Block as a Type, set the Design Theme and press Continue.
3. Fill out the Storefront Properties.
Since CMS Block Type and Design Theme have been chosen already you won't be able to change that on this stage.
- Give the CMS block a Title.
- Assign it to Store Views it will be available on.
- Set the Sort Order. Note: the smaller the number the higher it will appear on the list of CMS blocks.
4. Set the Layout Updates.
Here you set the exact page and place you want the CMS block to be displayed on.
- Choose any Category, Product or Generic Pages to place the CMS block.
- Select the Container, the exact part of the page you want CMS block to be displayed.
5. Go to Widget Options and select the CMS block to assign to this widget.
Once you Save the widget you can go to the storefront and check it out.