The home page of my website contains blocks and views only. Hence, I want to remove both of the following message-

  1. Welcome to my web
  2. No front page content has been created yet.

I tried to add following code as described here but I can still see the message Welcome to my web

  • Which theme are you using?
    – CodeNext
    Commented Dec 14, 2016 at 9:25
  • I ran into the same in Drupal 7... this module took care of it for me. Don't know how, but pretty sure the answer above with page.tpl.php will do the trick too. drupal.org/project/empty_front_page
    – edukates
    Commented Dec 14, 2016 at 12:34

1 Answer 1


Both are displayed by the different code, hence you need to unset/remove both.

1. Create a separate front page template: In your theme's tempaltes folder make a duplicated of page.tpl.php and rename the dulpicate one as page--front.tpl.php. Now your all other pages will be handeled by page.tpl.php and the only front-page will be handeled by page--front.tpl.php.

2. Edit the page--front.tpl.php template: Now, as you said you are able to remove the message using the code which is in your Question, so go ahead with that.

Secondly, remove the following code from your page--front.tpl.php, which will remove the Welcome...... part.

<?php if ($title): ?>
   <h1 id="page-title">
     <?php print $title; ?>
<?php endif; ?>
  • Little confused... Can you please have a look into page.tpl.php ?
    – ravi
    Commented Dec 14, 2016 at 10:04
  • It is line 169.
    – CodeNext
    Commented Dec 14, 2016 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.