Search code examples
drupaldrupal-7meta-tags

Drupal - How to change/remove meta tags


How can I remove or change existing meta tags in Drupal 7? In drupal 6 there was drupal_set_header or something like that, but Drupal 7 doesn't know about that.

Is there any way I can do this without having an extra module? Currently I have 2 meta description tags, and I don't want that.


Solution

  • You can implement hook_html_head_alter() to change existing head tags in Drupal 7.

    Also you can use the drupal_add_html_head() and drupal_add_html_head_link() functions in place of the old drupal_set_header().