I am trying to remove the advanced search link from the header in Magento 2 but it doesn't seem to be disappearing after I've extended the default.xml layout file found in the catalog search module. My default.xml file is located in the following directory:


And contains the following contents:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceBlock name="advanced-search-link" remove="true"/>

Is this the correct way to extend the catalog search default layout file? In order to remove a block from layout do you have to override the layout file rather than extend it?

  • Might be helpful magento.stackexchange.com/questions/94317/…
    – amitshree
    Commented Aug 11, 2016 at 16:01
  • If you have cache enabled, be sure to clear it.
    – V.S
    Commented Aug 11, 2016 at 17:01
  • All caches are disabled with the mode set to developer. After manually clearing all the caches it still doesn't seem to change anything. Commented Aug 12, 2016 at 11:10

2 Answers 2


The following link helped me resolve the issue:

Remove advanced search link from top.search in Magento 2


Use this inside (theme_dir)/Magento_Search/layout/default.xml OR (theme_dir)/Magento_Theme/layout/default.xml

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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