How to Move Category CMS Block to Other Place?

By default, the category CMS block of Magento 2.3, and Magento 2.4 display its contents just under category description. How to move it to other places, say move it just after main content, after category product list, after page bottom, or just before footer.

Say your custom verder name is “Canada”, and theme name is “Eyewear”, create catalog_category_view.xml, and place it under app/design/frontend/Canada/Eyewear/Magento_Catalog/layout/.

Add the following contents:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <body>
    <move element="category.cms" destination="main.content" after="content" />
 <!--    <move element="category.cms" destination ="content" after="category.product"/>
    <move element="category.cms" destination="page.bottom" after="-" />
    <move element="category.cms" destination="footer" before="-" /> -->
  </body>
</page>

Save the file, and run the following commands via ssh:

bin/magento c:c
bin/magento c:f

Published
Categorized as Magento