is there a way to remove the "Welcome to your Drupal installation!' WITHOUT promoting content to first page? I just want a block to appear there on the top, no specific post promoted to front page.

Thanks

Comments

michaelfavia’s picture

That welcome message is hardcoded by default when there isnt any content. (as an aside we have tried in the pas to "whitebox" drupal and remove these brnadings by defaiult but that hit a roadblock iirc) but you can easily install the views module and create a view for the frontgpage that mimics its functionality perfectly. then you can set the "empty text" of that view to anything youd like and assign that page to the "frontpage" of your site in Admin > site config > site information. Hope that helps.

tinny’s picture

what i did was this:

1) create a view
in the view...
2) create a page display
3) set up filters, fields etc
4) add argument: Global: Null > Action to take if argument is not present: Display empty text
5) edit Page settings > path > node
(so the path is http://localhost/node ie. your home page)

zeta1600’s picture

This worked for me.

fuquam’s picture

How do you add the argument in a views setting?

krishnakrgupta’s picture

Just Go to list of view lists, enable the front page view which is coming by default .
Edit the front page view, set the permission under Page settings from None to Permission Permission | View published content .

Go to site information from admin menu, set the front page to view page path.

See this link: http://www.krishnakumargupta.com/removing-welcome-drupal-message-without...

Hope it will work for you also.

Cheers.

kuydigital’s picture

I tried this technique on Drupal 7 and I think it's the best way/method without touching the core. Thanks!

mahmost’s picture

In drupal 7, if you have your own theme, you can edit your theme's template.php and add this to hook_process_page implementation .. (you can clone the default theme to sites/all/themes and edit it)

if (drupal_is_front_page()) { $variables['title']=""; }

I tried working on a cloned theme from bartik (the default drupal 7 theme) and it worked fine.

Please note that you will need to rename the new theme folder in /sites/all/themes/ and the info file inside and then replace all occurrences of the old name in template.php (Thanks to this post)

pszpak’s picture

I, like many others, have been searching long for an answer to this problem that is not a css hack or views trickery and have finally found the answer here. For those who are pasting this code verbatim into their template.php files and having no results the following clarification will be helpful:

function THEME-NAME_preprocess_page(&$variables) {
if (drupal_is_front_page()) { $variables['title']=""; } 
}

As you can see you have to add another line to the above to make it work. (The hook_process_page thingy mentioned above.) THEME-NAME must be replaced with your theme's name.

It works with Drupal 7.

hunginf’s picture

hook_preprocess_html

function THEME-NAME_preprocess_html(&$variables) {
  if (drupal_is_front_page()) { $variables['head_title']="CHANGE TITLE NAME"; } 
}

Drupal 7 !

ronsnow’s picture

Rather than setting title directly, I recommend using the drupal_set_title() function. Generally the themes I use have a page.preprocess.inc but this code could work in the template.php file too:

      if (drupal_is_front_page()) { 
         drupal_set_title('');
       }

The above code assumes that it is within the php code so no need for the ?php tags

fuquam’s picture

I tried this technique but my theme must not have liked the code because I just got the blank white page of doom. Does it need to be in a specific place?
Thanks.

webkenny’s picture

In case folks land here on a Google search...

The easiest way to accomplish this in Drupal 7 is simply cloning your page.tpl.php file in your custom or sub-theme and calling it page--front.tpl.php (Note the double dash).

Find this code:

<?php if (!empty($title)): ?>
  <h1 class="page-header"><?php print $title; ?></h1>
<?php endif; ?>
  1. Delete it (or replace with whatever you like).
  2. Clear caches.
  3. Profit.

Kenny S.
Follow me on Twitter

ItangSanjana’s picture

Or use hook_page_alter().

/**
 * Implements hook_page_alter().
 */
function YOURMODULE_OR_YOURTHEME_page_alter(&$page) {
  if (
    drupal_is_front_page() &&
    isset($page['content']['system_main']['default_message']['#markup'])
  ) {
    $page['content']['system_main']['default_message']['#markup'] = '';

    // Check for the title too.
    if (drupal_get_title()) {
      drupal_set_title('');
    }
  }
}
uniweb’s picture

It did the trick for me thank you !