Magento 2 – Header Links Missing from Checkout Pages

checkoutheadermagento2theme

In Magento 2, the "header links" element (top.links) is missing on checkout pages. I'm using a custom theme with Magento/blank as the parent. I have added custom links to my theme at app/design/frontend/vendor/theme/Magento_Theme/layout/default.xml, and I want those links to also appear on checkout pages (everything after the cart page).

Best Answer

In your theme's xml file:

app/design/frontend/<Vendor>/<themename>/Magento_Checkout/layout/checkout_index_index.xml

Write this code:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
      <referenceBlock name="minicart" remove="false" />
      <referenceContainer name="header.panel" remove="false" />
      <referenceBlock name="top.search" remove="false" />
      <referenceBlock name="catalog.compare.link" remove="false" />
      <referenceBlock name="catalog.topnav" remove="false"/>
      <move element="logo" destination="header-wrapper"/>
</body>
</page>
Related Topic