🔥 Just Launched! Werra Premium Template for HyväSee it in Action

How to Remove Sort by “Price” Option in Magento 2

By Sanjay JethvaUpdated on Jul 17, 2025 3 min read

Every Magento 2 stores have a variety of products under different categories. Sometimes, it becomes tedious for customers to choose the product they exactly want. To boost sales and help the customer to find out specific items, one can sort category products in Magento 2.

Easy sorting allows visitors to check the products quickly with less scrolling. It enhances the onsite user experience.

Position, product name, and price are the default sorting options available in Magento 2.

to remove sort by price option from category page in Magento 2

Contradictory to adding sort by options, you may want to remove them. For example, you may want to remove sort by price option in Magento 2 for the below reasons:

Here, I’m explaining the steps to remove sort by price option in Magento 2, follow it to remove price sorting option and target non-budget focused buyers.

Steps to Remove Sort by “Price” Option in Magento 2

1 . Create di.xml in Vendor/Module/etc and follow the below code.

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Model\Config">
        <plugin name="Vendor_ModuleName::addCustomOptions" type="Vendor\Module\Plugin\Model\Config"/>
    </type>
</config>

2. Next, create Config.php in Vendor/Module/Plugin/Model

<?php

use Magento\Store\Model\StoreManagerInterface;

class Config
{
    protected $_storeManager;

    public function __construct(
        StoreManagerInterface $storeManager
    )
    {
        $this->_storeManager = $storeManager;
    }​
    public function afterGetAttributeUsedForSortByArray(\Magento\Catalog\Model\Config $catalogConfig, $options)
    {
        unset($options['price']);
        return $options;
    }​
}

After applying the above code, you can see the sort by price option vanished from the sort by options dropdown on the category page.

to Remove Sort by Price Option from Category Page in Magento 2

As easy as ABC, right?!

Do consider sharing the post with Magento Community via social media.

Thank you.

Sanjay Jethva Full Image
Article bySanjay Jethva

Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe. His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.