Magento 2 – How to Change Position of Sign In and My Account Link

magento2toplinks

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.

Best Answer

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.