Just wondering why I am always presented with the same header. Here is my code.

//get template header
$url = 'http://www.skazkaimages.com/' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
if (false !== strpos($url,'weddings')) {
get_header();
} elseif (false !== strpos($url,'portraits')) {
get_header ('custom.php');
} elseif (false !== strpos($url,'fitness')) {
    get_header ('custom2.php');
} else {
}

So if the URL is http://www.skazkaimages.com/weddings , I want it to use the ordinary header, if it is http://www.skazkaimages.com/portraits , I want it to use header-custom.php.

Read more here: Header incorrectly "get"s


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, ,

Wordpress related questions and answers: