0
 <referenceContainer name="header.wrapper">
          <block class="Magento\Theme\Block\Html\Header" name="header.links" after="logo">
            <arguments>
                <argument name="block_id" xsi:type="string">custom_header_text</argument>
            </arguments>
          </block>
        </referenceContainer>

app/design/frontend/Sm/multe/Magento_Theme/layout/default.xml

i added in code in magento 2 but not showing in header

0

Use Magento\Framework\View\Element\Text class for simple text.

Try following way:


<referenceContainer name="header.wrapper">
    <block name="sample_text" class="Magento\Framework\View\Element\Text">
        <arguments>
            <argument name="text" xsi:type="string">Custome Header Text</argument>
        </arguments>
    </block>
</referenceContainer>

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.