Question

I am trying to remove language switcher and to do this I have added a line in:

app/design/frontend/MyPackage/MyTheme/Magento_Theme/layout/default.xml

I just add a line in <body>

<referenceBlock name="store_language" remove="true"/>

Executed deployment script, but I am still seeing Magento_Store/templates/switch/languages.phtml in profiler files list

Any idea what should do to resolve it?

Was it helpful?

Solution

  1. <referenceBlock name="store_language" remove="true"/> should work, try to clean the cache :

    php bin/magento c:c && php bin/magento c:f.

  2. If it doesn't work, try to enable the template and block path hints : Stores > Configuration > Advanced > Developer > Debug and look the block name of the store switcher. if there no block, that means that the switcher has beed added in a phtml, in this case you have to do it in directly in that phtml.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top