In case you've already created the Magento 2 CMS block, you might be interested where you can display it. Magento allows you to display the CMS block on the category page, call the CMS block using layout XML or in PHTML file. But, what we're going to show you in this article is how to display the CMS block on Magento 2 CMS page or CMS block with the help of WYSIWYG editor. You can use this guide for WYSIWYG on other admin pages as well.
For this tutorial, we've decided to include CMS block into CMS page as an example. So take the next steps or watch the video down below.
Follow these steps to display the CMS block in content using WYSIWYG editor:
1. Navigate to Content > Pages, choose the CMS page you want to display the CMS block on and in the Action section choose Edit.
2. Unfold the Content section and press the Widget button to insert the widget.
- Set the CMS Static Block as the Widget Type to continue.
- Choose the widget Template and Select Block from the list of CMS blocks.
- Insert Widget.
3. Save changes and go to the storefront to check it.
So, that's it. The CMS block is successfully inserted into the CMS page via WYSIWYG. Now, you're probably wondering how to insert the CMS block into another CMS block in Magento 2.
The thing is that in order to display the CMS Block in another CMS block you just need to follow the same steps as inserting the CMS block into the CMS page we've described above. And here is the example of how Sale CMS block looks like in the Contact Us static block:
Watch this short video in order to learn how to insert CMS block into the WYSIWYG editor if you prefer the video instruction: