If you’re going to override the Magento theme then I really would advise against modifying the Magento core files. A better practice is to create your own theme and override all the files you need. This way you can update Magento with much less worries. How you create your own theme is for another episode.
Supposing you have created your own theme you should have a directory structure that looks something like this:
1 2 |
/app/design/frontend/Organization/desktop |
In my case, the theme is called desktop.
In the desktop folder, create a directory called Magento_Search.
1 2 |
mkdir Magento_Search |
And in the Magento_Search folder, create another directory called layout
1 2 |
mkdir layout |
Now, with nano, create a file called default.xml
1 2 |
nano default.xml |
So if you were paying attention you now have:
1 2 |
/app/design/frontend/Organization/desktop/Magento_Search/layout/default.xml |
In the default.xml file, insert:
1 2 3 4 5 6 7 |
<?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSche$ <body> <referenceBlock name="advanced-search-link" remove="true"/> </body> </page> |
Clear the cache and you’re good to go.