changing the title of a custom Wordpress integrated page

elmeralmond

New Member
When I need to add a custom page to Wordpress based site I always load the theme's header first:\[code\]<?php require('../wp-blog-header.php'); include('../wp-content/themes/mytheme/header.php');?>\[/code\]Unfortunately then every custom page gets the same title (the blog's name) due to this code in header.php:\[code\]<head><title><?php if(is_home()) { bloginfo('name');} else { bloginfo('name'); echo ' | '; the_title(); } ?></title>\[/code\]What would be the best way to change this page title?
  • Is there a wordpress method to call before loading the header that will change \[code\]the_title()\[/code\]'s return value?
  • Should I change the header.php call so it will check if there is a previously defined custom value for my title?
Thanks,
 
Back
Top