In Magento/Blank an advanced search link appears under the search form by default. I have unsuccessfully been attempting to remove this by referencing the block name for removal. My issue is, not being able to determine what the actual block is called. Turning on path hints and block names was not helpful, nor was looking in the module folder. What am I missing?

<referenceBlock name="advanced.search" remove="true"/>

it's the solution:

<referenceBlock name="advanced-search-link" remove="true"/>

every static links search it inside default.xml of any module our case is in : vendor/magento/module-catalog-search/view/frontend/layout/default.xml

  • The link still shows in my store. I added the default.xml inside mytheme/Magento_Catalog-search/layout/ . Is that the right folder to put this file into? – Luis Garcia May 16 '16 at 17:04
  • I used it inside my theme at mytheme/Magento_Search/layout/default.xml. My code is the following <referenceContainer name="header.row"> <block class="Magento\Framework\View\Element\Template" name="top.search" as="topSearch" template="Magento_Search::form.mini.phtml" after="store.menu" /> <referenceBlock name="advanced-search-link" remove="true"/> </referenceContainer> – Phil Cook Nov 10 '16 at 9:48
  • 1
    that is not the correct path. You should not modify anything in vendor/magento – styzzz Jul 22 '17 at 22:04

The correct path to folder is


Open default.xml & Put this code anywhere after

<referenceBlock name="advanced-search-link" remove="true"/>

It will remove the advanced - search link from ALL THE PAGES.

  • 1
    Magento 2.3 This worked for me <referenceBlock name="catalog-search-advanced-link" remove="true"/> – insoftservice Oct 13 '19 at 17:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.