I have created two books, and both of them have child pages (which are also book pages). I have activated the option of commenting, in which the comment box is shown in the same book page.
All works fine when there is no comment on a particular page, but even when any user posts at least one comment on the page, the "Add New Comment" button appears in the links area below page-links and above the comment-wrapper; the comment box is shown below. I just wanted to ask how to remove this link because it is messing with the other options in the links area (e.g. printer friendly page, PDF).
I did create a hook using the following code.
<?php
/**
* Implementation of hook_link_alter
* Remove add comment link from a content type
* MODULENAME = remove_comment
**/
function MODULENAME_link_alter(&$links, $node){
if($node->type == 'book'){
unset($links['comment_add']);
}
}
?>
I have set the permissions for the users to post comments and have kept the comment box open by default. So, it makes no sense in having the Add new comment link.
And in admin/structure/types/manage/book, the settings are as shown below.