WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
get_header() calss header.php which holds the <title> tag in most theme's. – Bainternet Feb 7 '11 at 20:04
up vote 2 down vote accepted

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.

share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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