You seem to be using some custom JS that doesn’t work properly:
$(function(){
var url = window.location.pathname, // in real app this would have to be replaced with window.location.pathname
urlRegExp = new RegExp(url.replace(/\/$/,'')); // create regexp to match current url pathname and remove trailing slash if present as it could collide with the link in navigation in case trailing slash wasn't present there
// now grab every link from the navigation
$('#centeredmenu a').each(function(){
// and test its href against the url pathname regexp
if(urlRegExp.test(this.href)){
$(this).addClass('active');
}
});
});
To fix it, change the following line:
urlRegExp = new RegExp(url.replace(/\/$/,'')); // create regexp to match current url pathname and remove trailing slash if present as it could collide with the link in navigation in case trailing slash wasn't present there
like this:
urlRegExp = new RegExp(url.replace(/\/$/,'') || "index.php"); // create regexp to match current url pathname and remove trailing slash if present as it could collide with the link in navigation in case trailing slash wasn't present there
and then set your link like this:
<li><a href="index.php">Home</a></li>
Cheers!