Simple and easy solution for Magento 2 to display header and footer on checkout page
To display same header and footer on checkout page like other pages, you just override checkout page_layout
into your theme.
vendor/magento/module-checkout/view/frontend/page_layout/checkout.xml
Copy into your theme
app/design/frontend/[Vendor]/[Your_Theme]/Magento_Checkout/page_layout/checkout.xml
Replace checkout.xml
file code with default 1column.xml
like below and check after removing your cache.
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="empty"/>
<referenceContainer name="page.wrapper">
<container name="header.container" as="header_container" label="Page Header Container" htmlTag="header" htmlClass="page-header" before="main.content"/>
<container name="page.top" as="page_top" label="After Page Header" after="header.container"/>
<container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer"/>
</referenceContainer>
I hope it will work for you!