How to add Meta and Title tags to the document head on hook_menu "page callback"? Drupal 7

  • Why do you think adding meta tags have anything to do with menu hooks? – Mołot Nov 21 '14 at 7:47

Assuming Drupal 7...

For the title you can use drupal_set_title().

For the meta tags you can use drupal_add_html_head(). Example from geerlingguy in the comments of those docs:

$element = array(
  '#tag' => 'link', // The #tag is the html tag - <link />
  '#attributes' => array( // Set up an array of attributes inside the tag
    'href' => 'http://fonts.googleapis.com/css?family=Cardo&subset=latin', 
    'rel' => 'stylesheet',
    'type' => 'text/css',
drupal_add_html_head($element, 'google_font_cardo');
|improve this answer|||||

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