Magento – Magento 2 : How to Create Custom Header and Footer

createheadermagento2theme

I am creating new header.phtml and footer.phtml and store into app/design/frontend/<vendor_theme>/mytheme_name/theme_layout/template/html.

so how to add new header and footer in magento/blank theme.

Best Answer

You can overwrite the existing templates by copying them into your theme and making changes to the template files.

So copy these two files:

vendor/magento/module-theme/view/frontend/templates/html/header.phtml
vendor/magento/module-theme/view/frontend/templates/html/footer.phtml

Into your theme:

app/design/frontend/VENDOR/THEME/Magento_Theme/templates/html/header.phtml
app/design/frontend/VENDOR/THEME/Magento_Theme/templates/html/footer.phtml
Related Topic