I want to change header and footer in magento

I want to change header and footer in magento

October 3, 2026 · Illustrated author avatarBy Stefan Bogdanescu
I want to change header and footer in magento

Changing Magento Header and Footer: A Step-by-Step Guide

Hello,

I understand that you’re new to Magento and looking to customize your store’s header and footer. Don’t worry, I’ll guide you through the process step by step.

Understanding Magento Templates

In Magento, templates are responsible for rendering the HTML structure of your pages. The default header and footer files are located in the app/design/frontend/your_package/your_theme/Magento_Theme directory.

For example:

/app/design/frontend/<your_package>/<your_theme>/Magento_Theme/templates/html/header.phtml
/app/design/frontend/<your_package>/<your_theme>/Magento_Theme/templates/html/footer.phtml

Creating Your Custom Templates

  1. Create a new theme if you don’t have one already. This can be done through the Magento admin panel or by creating directories under app/design/frontend.

  2. Copy the default templates: Navigate to your custom theme directory and create copies of the header.phtml and footer.phtml files from the Magento_Theme module.

  3. Modify the copied files: Open these new files in a code editor. You can now modify the HTML structure, add CSS classes, or include any other changes you want for your header and footer.

Using Your Custom Templates

Now that you’ve created your custom templates, here’s how to apply them:

  1. Change the theme settings: Go to the Magento admin panel (Backend). Navigate to Stores > Configuration > General > Design.

  2. Select your new theme: In the ‘Current Configuration Scope’ row, choose the website or store view where you want to apply your custom header and footer.

  3. Set the template path: Under the ‘General’ section of the design tab, set both ‘Theme’ and ‘Template’ fields to your new package name followed by your theme name (e.g., ‘Magento/blank’ for a default theme).

  4. Click Save Config: This will apply your changes.

Advanced Customization with XML

For more advanced customizations, you can use the default_head_blocks.xml and default_footer_links.phtml files located in the app/design/frontend/your_package/your_theme/Magento_Theme/layout directory.

You can add or remove elements from the header, change the order of elements, or modify the footer links through these XML files. This requires a good understanding of Magento layout XML structure.

Best Practices and Tips

  • Always back up your changes before making major modifications.
  • If you’re unsure about any part of the process, don’t hesitate to consult the official Magento Developer Documentation.
  • Regularly clean your cache using the Magento admin panel (System > Cache Management) after making template changes.

Conclusion

Customizing your header and footer in Magento is a straightforward process once you understand the basic concepts. Remember, the key lies in creating new copies of the default templates and then modifying them according to your needs.

For more detailed tutorials on Magento development and customization, I recommend checking out our Magento Development category at Laravel Company. We provide comprehensive guides and best practices for all levels.

Happy coding!

Extensions Themes Admin Configuration

Our network