easy way to edit all the titles of the pages on my site without having to edit each page's title tags individually?
I'm working on my website made from php, and my programmer put the following code on the top of most pages: <?php include 'header.php'; ?>
Now in the header.php file, the title is Untitled Document. Is there an easy way for me to just edit the header.php file and have it change all the title tags of the page开发者_JS百科s that use the above function to call it?
If you edit the header.php, all pages that call in the include will show your changes.
In header.php there will be a variable such as $title. On your pages, if you are declaring the title on each page, then use $title instead of typing the title. Be sure that the include('header.php'); comes before your use of the $title variable.
精彩评论