Here is my code to add the mini cart on my custom header .Any help?

        <referenceBlock name="header.container" remove="true" />
        <referenceContainer name="page.wrapper">
            <block  class="Magento\Framework\View\Element\Template" name="custom_header" template="Magento_Theme::header.phtml" before="header.container"/>
        <move element="minicart" destination="custom_header.header" />

1 Answer 1


You move block minicart to wrong destination non-exist custom_header.header

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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