cancel
Showing results for 
Search instead for 
Did you mean: 

Hide categorie description below products

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

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

Hide categorie description below products

Hi,

I imported many categories over from another store. On the old store there where images and text above the shown product pages. This has been imported on the new store: http://prntscr.com/k0phu8

Is it possible to have this text moved and collapsed below the main body product overview? It should not be deleted because it's is good for the SEO.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Hide categorie description below products

Add below code in your file and its working,

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<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>
	    <referenceContainer name="content">
			<block class="Magento\Cms\Block\Block" name="slide-category" before="-">
				<arguments>
					<argument name="block_id" xsi:type="string">slide-category</argument>
				</arguments>
			</block>
			<block class="Magento\Theme\Block\Html\Title" name="page.main.title" template="html/title.phtml"/>
		</referenceContainer>
        <referenceContainer name="sidebar.additional">
            <block class="Magento\Cms\Block\Block" name="category-view-left-custom-block" after="-">
				<arguments>
					<argument name="block_id" xsi:type="string">category-view-left-custom-block</argument>
				</arguments>
			</block>
			<referenceBlock name="wishlist_sidebar" remove="true"/>
			<referenceBlock name="sale.reorder.sidebar" remove="true"/>
        </referenceContainer>
        <move element="category.description" destination="content" after="category.products"/>
    </body>
</page>

 Above solutions works or not, Kindly check and let me know?

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

View solution in original post

5 REPLIES 5

Re: Hide categorie description below products

You need to create catalog_category_view.xml and keep below content under this file,

<?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="category.description" destination="content" after="category.products"/>
    </body>
</page>
If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

Re: Hide categorie description below products

Thanks once again for your reply ;-)

And where should Ik create this file? In the root? And will the text also be collapsed?

Re: Hide categorie description below products

You need to create file under your theme Magento_Catalog folder,

Path will be,

app/design/frontend/{Vendor}/{themename}/Magento_Catalog/layout/catalog_category_view.xml
If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

Re: Hide categorie description below products


@Rakesh Jesadiya wrote:

You need to create file under your theme Magento_Catalog folder,

Path will be,

app/design/frontend/{Vendor}/{themename}/Magento_Catalog/layout/catalog_category_view.xml

I already got a catalog_category_view.xml file in that folder?

See code:

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<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>
	    <referenceContainer name="content">
			<block class="Magento\Cms\Block\Block" name="slide-category" before="-">
				<arguments>
					<argument name="block_id" xsi:type="string">slide-category</argument>
				</arguments>
			</block>
			<block class="Magento\Theme\Block\Html\Title" name="page.main.title" template="html/title.phtml"/>
		</referenceContainer>
        <referenceContainer name="sidebar.additional">
            <block class="Magento\Cms\Block\Block" name="category-view-left-custom-block" after="-">
				<arguments>
					<argument name="block_id" xsi:type="string">category-view-left-custom-block</argument>
				</arguments>
			</block>
			<referenceBlock name="wishlist_sidebar" remove="true"/>
			<referenceBlock name="sale.reorder.sidebar" remove="true"/>
        </referenceContainer>
    </body>
</page>

Re: Hide categorie description below products

Add below code in your file and its working,

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<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>
	    <referenceContainer name="content">
			<block class="Magento\Cms\Block\Block" name="slide-category" before="-">
				<arguments>
					<argument name="block_id" xsi:type="string">slide-category</argument>
				</arguments>
			</block>
			<block class="Magento\Theme\Block\Html\Title" name="page.main.title" template="html/title.phtml"/>
		</referenceContainer>
        <referenceContainer name="sidebar.additional">
            <block class="Magento\Cms\Block\Block" name="category-view-left-custom-block" after="-">
				<arguments>
					<argument name="block_id" xsi:type="string">category-view-left-custom-block</argument>
				</arguments>
			</block>
			<referenceBlock name="wishlist_sidebar" remove="true"/>
			<referenceBlock name="sale.reorder.sidebar" remove="true"/>
        </referenceContainer>
        <move element="category.description" destination="content" after="category.products"/>
    </body>
</page>

 Above solutions works or not, Kindly check and let me know?

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial