Question

Magento 2 how to change Position of My Account Link and Sign In link in header.

i want to show position like, Sign In, My Account and My Wishlist.

Theme is blank to working for it.

Thanks.

I would like to show My Account only after Successfully Sign in.

Was it helpful?

Solution

Just add code inside default.xml file with after attribute after="authorization-link",

<referenceBlock name="top.links">            
            <block class="Magento\Customer\Block\Account\AuthorizationLink" name="authorization-link"
                   template="account/link/authorization.phtml"/>
            <block class="Magento\Customer\Block\Account\Link" name="my-account-link" after="authorization-link">
                <arguments>
                    <argument name="label" xsi:type="string" translate="true">My Account</argument>
                </arguments>
            </block>
        </referenceBlock>

Now position is change inside header file.

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