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

This is more of a conceptual question, but it has actual ramifications.

Going through the various SEO plugins I found nowhere a PHP tag that should be embedded in the actual HTML page and echo the meta data. How does it work then?

Simply saving it to the DB doesn't seem enough. What is the mechanism through which the plugin "injects" the SEO data to the page?

share|improve this question
Wiki style: {CITATION NEEDED} – brasofilo Jan 5 '13 at 11:05
up vote 1 down vote accepted

In case you are talking about adding meta tags and changing the title they rely on wp_head action being fired at theme header before the </head>tag is generated.

For changing the title they probably use the wp_title filter. Older versions of "all in one seo" used to buffer the head section and replace the title tag in something like

function start_buf( {

function end_buf() {
  $head = ob_get_contents();
  $head = string replace '<title>....</title>' in $head with the configured title
  echo $head;
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.