cancel
Showing results for 
Search instead for 
Did you mean: 

how to remove the category directory and title in Luma theme

how to remove the category directory and title in Luma theme

In the Magento 2 Luma theme, on each page, under the category bar, it always shows the category directory and then again that category's title in big size font. For example, Category A, under the category bar, it shows something as below:

              Home > Category A

              Category A

 

How can I remove the directory as well as the title? Thanks guys.

 

1 REPLY 1

Re: how to remove the category directory and title in Luma theme

You need to create one xml file inside theme or module level,

Create xml with name catalog_category_view.xml now keep below content under xml,

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. 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>
       <!-- remove breadcrumbs(path) -->
        <referenceBlock name="breadcrumbs" remove="true" />
        <!-- remove title-->
        <referenceBlock name="page.main.title" remove="true" />
    </body>
</page>

Clear Cache. Your changes will applied.

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