Adding custom meta tags to nodes, dependent on author name? I would like to add the meta tag

`&lt;meta name="robots" content="follow,noindex"&gt;`


to all nodes (content type is article) written by specific authors, not only for their new articles but for the few hundred that already exist. 

I've installed metatag and metatags-quick, neither seem to offer the functionality I'm after. This is a drupal 7 installation. 

I'd rather not have to edit the php, as I'm unfamiliar with that, but I will if I have to. 

Does anyone know a way to do this?
I don't know of a metatag module which gives you that level of granularity; you might have to do it in code.

Fortunately, it's pretty easy. You'll need a custom module, in which you should implement hook_node_view(), and use drupal_add_html_head() to add the meta tag based on custom logic.

Very brief example:

function MYMODULE_node_view($node, $view_mode, $langcode) {
  if ($node-&gt;type == 'foo' &amp;&amp; $view_mode == 'full') {
    if ($node-&gt;name == 'admin') {
      $tag = array(
        '#type' =&gt; 'html_tag',
        '#tag' =&gt; 'meta',
        '#attributes' =&gt; array(
          'name' =&gt; 'robots',
          'content' =&gt; 'follow,noindex',
        ),
      );
      drupal_add_html_head($tag, 'MYMODULE:robots:noindex');
    }
  }
}