Magento Themes and Magento Extensions

Magento Check if Home page is Current Page

Share

There is no built-in default function to check if the current page is the home page in Magento. But it doesn’t stop you from writing your own.

One way to do so is:

1
if ( $_SERVER['REQUEST_URI'] == "/" || $_SERVER['REQUEST_URI'] == "/index.php" )

Comments are closed.