Main menu

Hide Node Title on Front Page

Error message

Notice: Undefined property: stdClass::$comment_count in comment_node_page_additions() (line 728 of /var/www/html/drupal_core/modules/comment/comment.module).
25 Feb
Published by Mark W. Breneman

Hide the Node Title on a Page drupal.orgHide Node Title on Front PageHere is an example of a way to accomplish this only on the front page. Wrap the H1 in your page.tpl.php with the 1st and 3rd line of this code example. The second line is an example of what may be publishing your title in page.tpl.php.<?php if ($title && !$is_front): ?> <h1 class="title"><?php print $title; ?></h1><?php endif; ?>

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.