How to Add rel="nofollow" in "Add new comment" link in teaser? Is there a code to add rel="nofollow" in the "Add new comment" link under teaser?

This is the code in the teaser as generated by D7:

Add new comment

So how I do I add rel="nofollow" in that line?
You could do this by implementing hook_node_view_alter in your custom module or theme.

//replace MODULENAME below with your custom module's name
function MODULENAME_node_view_alter(&amp;$build) {
  if ($build['#node']-&gt;type == 'book') {
    $build['links']['comment']['#links']['comment-add'] = "rel=\"nofollow\"";
  }
}


This is for node type book, you could replace it by the content type you are using.

Here is the Module developer's guide, which should get you started.