how to remove the 'home' link from top menu in magento?

how to remove the 'home' link from top menu in magento?

July 7, 2026 · Illustrated author avatarBy Stefan Bogdanescu
how to remove the 'home' link from top menu in magento?

How to Remove the ‘Home’ Link from Top Menu in Magento

If you’re looking to remove or disable the ‘home’ link from your top menu in Magento, you’ve come to the right place. This common issue can be resolved using a combination of code and configuration changes.

There are several reasons why you might want to eliminate the home page link from your store’s navigation:

  1. Simplify Navigation: A smaller menu is easier for users to scan.
  2. Branding Consistency: If you have a custom logo or branding, the home link can look out of place.
  3. Reducing Clicks: Removing the home button encourages customers to explore other categories.

The Incorrect Approach

Before we dive into the correct solution, let’s address what doesn’t work:

  • You won’t find any direct code references for the ‘home’ link in app/design/frontend/default/catalog/navigation/top.phtml.
  • Manipulating the top.links reference in your theme’s layout XML file might not produce the desired results.

The Correct Method: Using Magento’s Core Functionality

Step 1: Understand the Menu Generation Process

In Magento, top menu generation is handled by the Mage_Page_Block_Html_Topmenu class. The home link is hardcoded in this block as a static element.

To remove the home link without modifying core files (which is generally not recommended), you can use an event observer.

First, create a module with a model and an observer:

<config>
    <modules>
        <Namespace_HomeLinkRemover>
            <version>1.0.0</version>
        </Namespace_HomeLinkRemover>
    </modules>
</config>

<global>
    <models>
        <namespace_home_link_remover>
            <class>Namespace_Homelinkremover_Model</class>
        </namespace_home_link_remover>
    </models>
</global>

Next, add an observer to the core_block_abstract_prepare_layout_events event:

<events>
    <core_block_abstract_prepare_layout_before>
        <observers>
            <namespace_home_link_remover_observer>
                <type>singleton</type>
                <class>Namespace_Homelinkremover_Model_Observer</class>
                <method>removeHomeLink</method>
            </namespace_home_link_remover_observer>
        </observers>
    </core_block_abstract_prepare_layout_before>
</events>

Finally, implement the observer method:

public function removeHomeLink($event)
{
    if ($block = $event->getBlock()) {
        if ($block instanceof Mage_Page_Block_Html_Topmenu) {
            foreach ($block->getLinks() as $key => $link) {
                if (strpos($link['href'], 'home') !== false) {
                    unset($block->getLinks()[$key]);
                }
            }
        }
    }
}

Step 3: Confirm the Removal

Save your changes, clear the Magento cache (cache:clean command), and refresh your website. The home link should now be gone from your top menu.

Conclusion: A Clean Solution for a Common Problem

Removing the ‘home’ link from your Magento store’s top navigation is straightforward when you use an event observer to modify the menu generation process directly. This approach respects Magento’s architecture, requires no core file modifications, and ensures that your changes persist across updates.

Remember, always test changes thoroughly in a staging environment before deploying them to your live site.

For more advanced customizations and theme development tips, check out our comprehensive guide on Magento theme development best practices.

Catalog Extensions Themes Configuration

Our network