I want to move my store switcher from footer to top header bar like this

like show this is footer screen shoot enter image description here

enter image description here

at here right side of create account link in Magento 2.4

1 Answer 1


to move store switcher to top header so should out code in default.xml file

<move element="store_switcher" destination="header.panel" after="header.links" />

here my default.xml file is this

<?xml version="1.0"?>
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceContainer name="header.panel">
            <block class="Magento\Framework\View\Element\Html\Links" name="header.links">
                    <argument name="css_class" xsi:type="string">header links</argument>
        <referenceContainer name="footer">
            <block class="Magento\Store\Block\Switcher" name="store_switcher" as="store_switcher" after="footer_links" template="Magento_Store::switch/stores.phtml"/>
        <referenceBlock name="report.bugs" remove="true"/>
        <move element="copyright" destination="before.body.end"/>
        <move element="store_switcher" destination="header.panel" after="header.links" />
        <referenceBlock name="custom-header-link" remove="true" />  

from using this i successfully move the store switcher from footer to top header see the below screen shoot.

enter image description here

enter image description here

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.