I'm calling drupal_add_html_head() a few times to add meta data for facebook integration. To my surprise, this data is not rendered in the order I add it.

Where is this data actually rendered? I would like to examine the code so I can understand the logic behind it.

I'm aware there's hook_html_head_alter too, but without understand the render order, messing with the order of input data is not likely helpful.

  • Why you don't use opengraph_meta module? it will search for title, image and description and other required meta tags... Feb 5, 2012 at 17:12

1 Answer 1


template_preprocess_html() gets the tags for the <head>, and adds them to the html.tpl.php template file as $head.

The template file looks like this:

<head profile="<?php print $grddl_profile; ?>">
  <?php print $head; ?>
  <title><?php print $head_title; ?></title>

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.