Hide or Remove Category Filter from Layered Navigation in Magento 1.9

categorylayered-navigationlayoutmagento-1.9

I'm struggling to remove the Category filter from the layered, because I already have a category dropdown menu in my new website, so it will be only a waste of space (and confuse my customers)

I know that this issue was already asked many times and already solved, but I tried every solution without success. I believe that this is related to the custom template I use for the website.

After looking at my local.xml file (found in my template folder) I believe that I should work around these lines:

<reference name="product_list">
        <block type="core/text_list" name="category-right" as="category-right" translate="label">
            <label>Right Column</label>
            <block type="catalog/navigation" name="catalog.category" before="-" template="catalog/navigation/category_nav.phtml"/>
            <block type="catalog/layer_view" name="catalog.leftnav" after="catalog.category" template="catalog/layer/view.phtml"/>
            <block type="filterproducts/bestsellers_home_list" name="bestseller" template="catalog/navigation/best_sellers.phtml"/>
            <block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml">
                <block type="cms/block" name="cms_images_block">
                    <action method="setBlockId"><block_id>category_right_block</block_id></action>
                </block>
            </block>
        </block>
    </reference>

The first –block type– should be the category menu (and I'm fine with that). The second –block type– builds the "filter by" menu, just below the category menu, and I'm pretty sure that the problem is here.

I believe that I should unset something inside the "catalog.leftnav" but even if I try to add this code :

<catalog_category_layered>
     <reference name="product_list">
        <action method="unsetChild"><child>category_filter</child></action>
    </reference>
</catalog_category_layered>

nothing happens. What am I doing wrong?

Best Answer

Based on stackexchange.com answer:
If you want to do it via XML you should edit catalog.xml

replace:

<block type="catalog/layer_view" name="catalog.leftnav" 
    after="currency" template="catalog/layer/view.phtml" />  

with this:

<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml">  
    <action method="unsetChild"><alias>category_filter</alias></action>
</block>
Related Topic