Tue. Jul 2nd, 2024

2. Magento. How to add “Home” link to Magento top menu

1 min read
  1. First it would be necessary to log into the cPanel file manager or FTP;
  2. The file can be both edited either directly on server using the file manager in-built editor or downloaded and edited locally with an editor;
  3. It is always highly recommended to keep the original file prior to applying any changes;
  4. Following the app/design/frontend/tm_themes/themeXXX/template/page/html path, open the header.phtml file to edit it;
  5. At the bottom of the file, around lines 98-99, right after the main header nav ID, add the following piece of code:
    1
    2
    <a href=”<?php echo $this->getUrl(”) ?>” class=”link_home”><span class=”fa fa-home”></span></a>

    magento_how_to_add_home_link_to_magento_top_menu

  6. Update the file and re-upload it back to server;

    magento_how_to_add_home_link_to_magento_top_menu2

It’s recommended to clear Magento cache after this has been done.

Note: some minor CSS tweaks might be required to give new link a position relative to the main navigation menu.

July 2024
M T W T F S S
« Jun    
1234567
891011121314
15161718192021
22232425262728
293031