cancel
Showing results for 
Search instead for 
Did you mean: 

How to move category description?

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

How to move category description?

How can I move category description from top of the category page to top of the products list so that the sidebar is to the left of category description?

 

I have this in my app/design/frontend/{Company}/{Theme}/Magento_Catalog/layout/catalog_category_view.xml

<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.description" destination="category.products" />
  </body>
</page>

And this in my app/design/frontend/{Company}/{Theme}/Magento_Catalog/templates/category/products.phtml

<?php echo $block->getChildHtml('category.description'); ?>
<?php if (!$block->isContentMode() || $block->isMixedMode()): ?>
   <?php echo $block->getProductListHtml() ?>
<?php endif; ?>

 

1 REPLY 1

Re: How to move category description?

I have this same question.  I hope someone can help