Please could someone help me out!
I want to edit the header content to either remove or hide the following sections:
-Compare -The Store Switcher (ELLYANA STORE) -The Language Selector (ELLYANA_EN ENGLISH)
I use a custom theme: Fastest Magento 2 Theme.
Thank you.
Relevant Screenshot
-
Please check my ans.Aasim Goriya– Aasim Goriya2018年12月22日 11:09:25 +00:00Commented Dec 22, 2018 at 11:09
2 Answers 2
app/design/frontend/Codazon/fastest_grocery_gourmet/Magento_Theme/layout/default.xml
<body>
<referenceBlock name="store_language" remove="true"/> // To remove store language
<referenceBlock name="store_switcher" remove="true"/> // To remove store switcher
</body>
For the compare link, go to Stores>configuration> theme options> Product compare > Show compare page link in TopLinks area > No
-
Thank you so much this worked perfectly, although for the compare link I had to go to Codazon>fastest options>theme options> Product compare > Show compare page link in TopLinks area > NoAustin Powers– Austin Powers2018年12月22日 14:27:39 +00:00Commented Dec 22, 2018 at 14:27
-
The Store Switcher and Language Selector is still visible in the mobile version of the site how do I remove from there too? Thank you.Austin Powers– Austin Powers2018年12月22日 17:06:47 +00:00Commented Dec 22, 2018 at 17:06
-
About the mobile, it depends to your theme developpement, you have to find the 2nd block that display it for the mobile then, you remove it, it's is not a Magento standard, you can accept the answer if it helped you. Good luck2018年12月22日 19:22:17 +00:00Commented Dec 22, 2018 at 19:22
You can update your custom theme's header panel from below path.
Go to your Custom theme >> Magento_Theme >> Layout >> default.xml from here you can move block or remove block from header, check below code for your reference.
/[magento-root-directory]/app/design/frontend/[your-custom-theme]/Magento_Theme/layout/default.xml
<body>
...
<move element="catalog.topnav" destination="header-wrapper" before="logo"/>
<move element="top.search" destination="header-wrapper" after="catalog.topnav" />
<move element="minicart" destination="header.links" />
<move element="store_language" destination="header.links" before="-" />
<move element="store.settings.currency" destination="header.links" after="store_language" />
<move element="header.links" destination="header-wrapper" after="logo"/>
......
<referenceBlock name="header.panel" remove="true"/>
<referenceBlock name="store_language" remove="true"/>
<referenceBlock name="header.links" remove="true"/>
...
</body>
Please try this and let me know if any issue.
-
Thank you so much this was very very helpful, I used Prince's answer it was very pin point. Thanks I am grateful for your response to my question.Austin Powers– Austin Powers2018年12月22日 14:32:20 +00:00Commented Dec 22, 2018 at 14:32