i have an external php file which i m loading the wordpress header and footer into which works fine but does anyone have any ideas how you can change the page title?
/* Short and sweet */
define('WP_USE_THEMES', false);
require('/home/reboot/public_html/wp-blog-header.php');
// get wordpress header
get_header();
Just below require add the code like:
And this will work!
Note: You'll need to add the separator and space, otherwise the thing will join with your site title.
It did not work for me. I fixed the problem by using the following:
Applying
wp_title
filter in the file works for me:See: What is the constant WP_USE_THEMES for? and What is the correct way to use wordpress functions outside wordpress files?