0

I'm currently trying to move the category description to below the product grid.

Below is the catalog_category_view.xml layout:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="page.main.title" destination="content" before="category.products" />
        <move element="category.description" destination="content" before="category.products" />
        <move element="category.image" destination="page.top" before="breadcrumbs" />
        <move element="category.cms" destination="page.top" before="breadcrumbs" />
        <referenceBlock name="catalog.compare.sidebar" remove="true"/>
        <referenceContainer name="sidebar.additional" remove="true" />
        <referenceContainer name="page.top">
            <block class="Magento\Cms\Block\Block" name="catagory-and-product-page-usp-bar" before="breadcrumbs">
                <arguments>
                    <argument name="block_id" xsi:type="string">catagory-and-product-page-usp-bar</argument>
                </arguments>
            </block>
        </referenceContainer>
        <referenceContainer name="footer">
            <block class="Magento\Cms\Block\Block" name="usp-bar" before="-">
                <arguments>
                    <argument name="block_id" xsi:type="string">usp-bar</argument>
                </arguments>
            </block>
        </referenceContainer>
    </body>
</page>

I have tried updating the XML Layout on the category with the following code but nothing seems to change, Anyone got any ideas?

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

Code Found:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="page.main.title" destination="content" before="category.products" />
        <move element="category.description" destination="content" before="category.products" />
        <move element="category.image" destination="page.top" before="breadcrumbs" />
        <move element="category.cms" destination="page.top" before="breadcrumbs" />
        <referenceBlock name="catalog.compare.sidebar" remove="true"/>
        <referenceContainer name="sidebar.additional" remove="true" />
        <referenceContainer name="page.top">
            <block class="Magento\Cms\Block\Block" name="catagory-and-product-page-usp-bar" before="breadcrumbs">
                <arguments>
                    <argument name="block_id" xsi:type="string">catagory-and-product-page-usp-bar</argument>
                </arguments>
            </block>
        </referenceContainer>
        <referenceContainer name="footer">
            <block class="Magento\Cms\Block\Block" name="usp-bar" before="-">
                <arguments>
                    <argument name="block_id" xsi:type="string">usp-bar</argument>
                </arguments>
            </block>
        </referenceContainer>
    </body>
</page>
0

Try with below code, your code itself working good..I have checked in my local setup..

 <move element="category.description" destination="content" after="category.products" />

After that clear cache.

  • Doesn't seem to change anything – Willdobbo Sep 5 at 9:24
  • did you add the xml in corect path? could you share the path of overided file? – aravind Sep 5 at 9:26
  • I am adding the XML into the the following on the category section in the admin panel, Design>Layout Update XML – Willdobbo Sep 5 at 9:30
  • did you get any errors when saving the category? – aravind Sep 5 at 9:39
  • i have updated the answer just add above code directly in 'your category'->Design-> Layout Update XML – aravind Sep 5 at 9:43
0

Use the following code to move category description In Admin >> Category >> Design >> Layout Update XML

 <move element="category.description" destination="content" after="-" />

enter image description here

Don't use any <page> and <body> tag. Simply paste above code in Layout Update XML textarea.

Don't forgot to clear cache.

  • This doesn't seem to change anything – Willdobbo Sep 5 at 9:25
  • Can you please make sure catalog_category_view.xml is not overriding anywhere in other modules OR theme. – DJ Dev Sep 5 at 9:30
  • @Willdobbo Use my updated code (don't use any <page> and <body> tag ) to move category description In Admin >> Category >> Design >> Layout Update XML – DJ Dev Sep 5 at 9:49
  • Still nothing, I'm fairly new to administering this site so it could have a module overriding the XML layout – Willdobbo Sep 5 at 10:01
  • @Willdobbo Please try to use this code <move element="category.description" destination="content" after="-" /> I have added screenshot in my answer. Please see that and use my code as it is. – DJ Dev Sep 5 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.