I am trying to add custom header link, but it is not showing.


To add custom Header Link :

Create a default.xml file in the below path.


Add the Below Code.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceBlock name="header.links">
        <block class="Magento\Framework\View\Element\Html\Link" name="custom-link">
                <argument name="label" xsi:type="string" translate="true">Custom Link</argument>
                <argument name="path" xsi:type="string" translate="true">customlinkpath</argument>

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.