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.
You can show CMS block on category page to notify your customers about the top products, add a static block to the CMS page or even another CMS block to diversify their content.
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 insert CMS block in CMS page which is adding it with the help of a widget. So, once you create the CMS block you're good to go.
Watch this short video to learn how to add block to CMS page in Magento 2 using a widget or follow the step-by-step instructions below:
To add CMS Block to Magento 2 page via widget:
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 widgets.
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.
According to your widget settings, it will be displayed on the shopping cart page to encourage your customer to buy more.
However, what if you don't want to display free shipping offer for wholesalers or want to make the purchase amount bigger for certain groups of customers?
Unfortunately, Magento only allows you to add CMS blocks to Magento 2 pages. It doesn't have an option to define who to display them to.
In this case, you just need to set the CMS block restrictions in Magento 2 and display different CMS blocks to different customer groups, at different times and under different conditions.