tags:

views:

79

answers:

3

Hello,

My header is called as you can imagine, on each pages.

it means that on each pages i've the same title (bad for SEO)

Is there a workaround to set pages title outside the header.php ?

Thanks

+4  A: 

Make a variable $page_title. Set it before including the header and in the header have something like:

echo("<title>$page_title</title>");
nc3b
Thanks that was fast ;)$header = "title of my page";include_once 'header.php';header //echo ("<title>$header</title>");
Tristan
+2  A: 

Set a variable for the title before including the header, then output the variable within the header.

Ignacio Vazquez-Abrams
A: 

If you want to change the page title once a page is loaded, you can do it like above mentioned answer here, but if you want to change the title of the page, on the fly you need javascript for that.

Starx