{"id":1513,"date":"2021-01-11T12:04:12","date_gmt":"2021-01-11T12:04:12","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/remove-sort-by-price-magento-2\/"},"modified":"2025-07-17T10:08:49","modified_gmt":"2025-07-17T04:38:49","slug":"remove-sort-by-price-magento-2","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/remove-sort-by-price-magento-2\/","title":{"rendered":"How to Remove Sort by &#8220;Price&#8221; Option in Magento 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Every\u00a0Magento 2\u00a0stores 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\u00a0<a href=\"https:\/\/meetanshi.com\/blog\/sort-category-products-in-magento-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">sort category products in Magento 2<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Easy sorting allows visitors to check the products quickly with less scrolling. It enhances the onsite user experience.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Position, product name, and price are the default sorting options available in Magento 2.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/12\/1-1-1024x467.png\" alt=\"to remove sort by price option from category page in Magento 2\" class=\"wp-image-12407\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Contradictory to adding sort by options, you may want to remove them. For example, you may want to&nbsp;<strong>remove sort by price option in Magento 2<\/strong>&nbsp;for the below reasons:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When quality matters the most, comparing to the price.<\/li>\n\n\n\n<li>When the store owner wants to highlight other unique factors than price.<\/li>\n\n\n\n<li>When you sell premium products like gold jewelry, diamonds, etc.<\/li>\n\n\n\n<li>When your sell service and allow users to&nbsp;<a href=\"https:\/\/meetanshi.com\/magento-2-call-for-price.html\" target=\"_blank\" rel=\"noreferrer noopener\">call for price in Magento 2<\/a><\/li>\n\n\n\n<li>When you want to extend the price sorting by&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/add-magento-2-sort-by-price-for-low-to-high-high-to-low-options\/\">adding Magento 2 sort by price for low to high and high to low options<\/a>&nbsp;to save some clicks for budget friendly buyers.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Here, I\u2019m 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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to&nbsp;Remove Sort by \u201cPrice\u201d Option in Magento 2<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">1 . Create&nbsp;<strong>di.xml<\/strong>&nbsp;in&nbsp;<strong>Vendor\/Module\/etc&nbsp;<\/strong>and follow the below code.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?xml version=\"1.0\"?>\n&lt;config xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n        xsi:noNamespaceSchemaLocation=\"urn:magento:framework:ObjectManager\/etc\/config.xsd\">\n    &lt;type name=\"Magento\\Catalog\\Model\\Config\">\n        &lt;plugin name=\"Vendor_ModuleName::addCustomOptions\" type=\"Vendor\\Module\\Plugin\\Model\\Config\"\/>\n    &lt;\/type>\n&lt;\/config><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">2. Next, create&nbsp;<strong>Config.php<\/strong>&nbsp;in&nbsp;<strong>Vendor\/Module\/Plugin\/Model<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n\nuse Magento\\Store\\Model\\StoreManagerInterface;\n\nclass Config\n{\n    protected $_storeManager;\n\n    public function __construct(\n        StoreManagerInterface $storeManager\n    )\n    {\n        $this->_storeManager = $storeManager;\n    }\u200b\n    public function afterGetAttributeUsedForSortByArray(\\Magento\\Catalog\\Model\\Config $catalogConfig, $options)\n    {\n        unset($options['price']);\n        return $options;\n    }\u200b\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After applying the above code, you can see the sort by price option vanished from the sort by options dropdown on the category page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/12\/2-1-1024x484.png\" alt=\"to Remove Sort by Price Option from Category Page in Magento 2\" class=\"wp-image-12408\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As easy as ABC, right?!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do consider sharing the post with Magento Community via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Every\u00a0Magento 2\u00a0stores have a variety of products under different categories. Sometimes, it becomes tedious for customers to choose the product they exactly want. To boost&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1513","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=1513"}],"version-history":[{"count":3,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1513\/revisions"}],"predecessor-version":[{"id":13880,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1513\/revisions\/13880"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=1513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=1513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=1513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}