Is there anyway I can set what text should appear in the tags before get_header() is called in my .php files that are inside my theme's directory?

  • 1
    get_header() calss header.php which holds the <title> tag in most theme's.
    – Bainternet
    Feb 7 '11 at 20:04

It depends on your theme how exactly <title> is generated. At least some of it should be generated by wp_title() function, output of which you can filter at wp_title hook.


You can add a filter for the get_header hook and then you can return custom code for the header.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.