Hi all

How can I disable and remove form my web page the message "Log in to post comments"
thanks

Comments

VM’s picture

display none in css

azarzag’s picture

If you create your own module you MIGHT be able to get rid off it by using hook_link_alter(&$links, $node, $comment = NULL) . I havent tried it yet, but im pretty sure it would work. It might be an overkill tho.

totocol’s picture

Yo can also use views or page display or both to determine how your content will show and decide what links to display.

Ayesh’s picture

If you don't want to have comments for any node of this type, simply Disable comments in node type's settings page.
else, try

function ANYNAME_link_alter(&$links, $node) {
  foreach ($links AS $module => $link) {
    if (strcmp('comment_forbidden', $module) == 0) {
      // it's a "login to post comment" link, remove it
      unset($links[$module]);
    }
  }
}
GauravGautam’s picture

simple way ?