Skip to content

Magento 2 Minicart content not displaying

I’m working on developing my own theme by extending the Magento Blank theme.

I’m trying to add the minicart to my header.phtml file.

I’m loading the minicart in my header like so:

<?php echo $this->getLayout()
      ->createBlock('MagentoCheckoutBlockCartSidebar')
      ->setTemplate('Magento_Checkout::cart/minicart.phtml')
      ->toHtml(); ?>

The minicart shows on the frontend, but does not load the content, see link:
https://prnt.sc/mrrgli

Is there anything I’m missing?