Magento Themes and Magento Extensions

Magento Check if Home page is Current Page


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:

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

Comments are closed.