I have created a custom link using default.xml and moved it inside the top.links reference block.
This is my code
<referenceBlock name="top.links">
<block class="MagentoFrameworkViewElementHtmlLink" name="custom-top-link-blog">
<arguments>
<argument name="label" xsi:type="string" translate="true">Blog</argument>
<argument name="path" xsi:type="string">#</argument>
</arguments>
</block>
</referenceBlock>
I have also made some changes to top.links block.
<move element="register-link" destination="top.links"/>
<move element="top.links" destination="header-wrapper" after="minicart"/>
This is what I have achieved. Plz check the screenshot.
Now I need to move my custom link “Blog” before My Account that is in the first position. Screenshot where I need it.
How I can achieve this. I have tried adding before=”-” in this line
<block class="MagentoFrameworkViewElementHtmlLink" name="custom-top-link-blog" before="-">
but it did not worked. Plz suggest how I can achieve this.