How to change category filter position in magento layer navigation

How to change category filter position in magento layer navigation

July 12, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How to change category filter position in magento layer navigation

Changing Category Filter Position in Magento Layer Navigation

If you’re working with Magento 1.7 and want to modify the order of filters displayed in your category page’s left sidebar layer navigation, you can easily do so by editing your theme files. In this tutorial, we’ll guide you through changing the position of the “categories” and “brands” filters from categorie brands size color to brands categories size color.

Understanding Magento Layer Navigation

Magento’s layer navigation (also known as the left sidebar filter) is a powerful feature that allows shoppers to filter products based on various attributes. These filters are defined in the catalog_product_view.xml layout file and can be customized to meet your store’s specific needs.

Changing Filter Order: The Step-by-Step Guide

  1. Locate Your Theme Files

    First, navigate to your Magento installation’s theme directory using an FTP client or the File Manager in your hosting control panel. You’ll need to locate the app/design/frontend/your_package/your_theme folder.

  2. Open The Layout File

    Within this theme folder, look for the catalog_product_view.xml file located under the layout subfolder (e.g., app/design/frontend/your_package/your_theme/layout/catalog_product_view.xml).

  3. Identify The Filter Blocks

    Open the catalog_product_view.xml file in a text editor or IDE. You’ll find several <block> tags representing the various filters displayed on your category page’s left sidebar.

<block type="catalog/layer_view" name="catalog.product.list.layer.view" as="layer_view" template="catalog/layer/view.phtml"/>
  1. Modify The Filter Order

    To change the order of the “categories” and “brands” filters, you need to manipulate the <action method="addFilterByAttribute"> tags inside the product_list_toolbar block.

<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
    <action method="setTemplate"><template>catalog/product/list/toolbar.phtml</template></action>
    <block type="page/html_pager" name="product_list_toolbar_pager"/>
    <action method="addFilterByAttribute"><attribute>manufacturer</attribute><label>Brands</label></action> <!-- Brands -->
    <action method="addFilterByAttribute"><attribute>category_id</attribute><label>Categories</label></action>  <!-- Categories -->
    ...
</block>
  1. Update The Filter Order

    To achieve the desired order (brands categories size color), swap the positions of the “manufacturer” (brand) and “category_id” actions:

<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
    <action method="setTemplate"><template>catalog/product/list/toolbar.phtml</template></action>
    <block type="page/html_pager" name="product_list_toolbar_pager"/>
    <action method="addFilterByAttribute"><attribute>category_id</attribute><label>Categories</label></action>  <!-- Categories -->
    <action method="addFilterByAttribute"><attribute>manufacturer</attribute><label>Brands</label></action> <!-- Brands -->
    ...
</block>
  1. Save And Refresh Your Magento Store

    Save the modified catalog_product_view.xml file and then refresh your Magento store in a browser to see the updated filter order on your category pages.

Conclusion

Changing the order of filters in Magento 1.7’s layer navigation is a straightforward process that involves editing the catalog_product_view.xml layout file within your theme directory. By following this guide, you can easily rearrange the “categories” and “brands” filter positions to suit your store’s needs.

Remember, when working with Magento themes and layouts, it’s always a good practice to create a child theme or use an existing one (like Luma) as a base for your modifications. This ensures that your customizations are preserved during future Magento updates.

If you found this tutorial helpful, feel free to explore more Magento-related content on our blog.

Magento 1 Catalog Themes Orders

Our network