5

I'm trying to remove the currency switcher from the header in Magento 2 with little luck. I've tried this in my theme's default.xml file

<referenceBlock name="store.settings.currency" remove="true"/>

But that doesn't seem to do anything. Plan B is to hide it with CSS but I feel like I should be able to remove it with a layout update.

3 Answers 3

11

Block name to remove currency should be "currency", please try:

<referenceBlock name="currency" remove="true"/>
0
1

To remove currency from the website totally - do not forget about the mobile version, as there is another template which is responsible for rendering it inside "hamburger". So use both variants (from the question too)

<referenceBlock name="currency" remove="true" />
<referenceBlock name="store.settings.currency" remove="true" />
0

Step 1: Go to the following path

app/design/frontend/Themes/Yourtheme/Magento_Theme/layout/default.xml

And add the below code:

<?xml version="1.0"?>

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

Note: In case you already have file named “default.xml”, you just need to add the below two lines before the closing of </body> tag.

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.