Is there a way to remove the "No front page content has been created yet." text, or even change the text?


WorldFallz’s picture

create a basic page or article and promote to front.

Wishy’s picture

Besides that.

WorldFallz’s picture

that's the way it's meant to be replaced, but you might be able to also do it with the locale/translation or stringoverrides module but that seems overkill.

omrmankar’s picture

create BESIC PAGE  set only title and go to Basic site settings "/admin/config/system/site-information" goto "Default front page"
setting an set node id then goto front page remove message  "Add new Content" automatically .

swati chouhan’s picture

Thank you so much for this easy way to remove this message :)

tjwilly’s picture

Sometimes, using a block to house that basic "welcome" message works better than shoving an article in there. Especially when having multiple regions makes for aligning and tweaking content important in multi-column themes. I too would like to see a simple solution for this.

rickumali’s picture

In Home, then Administration, then Configuration, then System, then Site information, you can specify the "Default front page". I specified a node (an alias), and my front page became that content. Leaving this blank dumps the content feed.

Argus’s picture

From slightly adapted for Drupal 7:

In your theme's page.tpl.php replace

<?php print $content_zone; ?>


<?php if (!drupal_is_front_page()) { ?>
<?php print $content_zone; ?>
<?php } ?>
Meepu’s picture

I had to modify the code Argus gave a little for Bartik.

The line I had to find was:
print render($page['content']);

Which became:

<?php if (!drupal_is_front_page()) { ?>
<?php print render($page['content']); ?>
<?php } ?>

Also, you might want to take out the h1 title. It looks like this:

      <?php if ($title): ?>
        <h1 class="title" id="page-title">
          <?php print $title; ?>
      <?php endif; ?>

And turns into:

      <?php if ($title && !drupal_is_front_page()): ?>
        <h1 class="title" id="page-title">
          <?php print $title; ?>
      <?php endif; ?>

It worked just fine, but in the end I decided not to modify any code. Instead, I used Views to generate a new view of a front page, and then I turned the view into the default front page as rickumali instructed (he was using a node though). If I ever want to promote something to front page, I can now do it without editing code.

mikib’s picture

Like Meepu said, I didn't edit any code.

What i did is:
1. create view
2. go to " configuration>site information"
3. input path of the view I just created as a default front page.
- you can see the PATH on View list ( structure > views)

I am using drupal 7.

" Welcome to YOUR SITE NAME " and " No front page content has been created yet." message are gone !


Pafla’s picture

I like that too but-

How do I create that View?

Views is enabled and clicked Add new and then?


timodwhit’s picture

Hey Pafla,

We have all been here. I would spend a couple minutes looking into what/how views functions and the power that is possible. Once you understand how views functions and what can be done, it will then give you more of an understanding on what needs to be done.

WRT to your post, create a page that calls the type of information you are looking for. Where it asks for the URL, insert the path you desire. Then do as step 2 and 3 state.

Best of luck. Also, try to hit up the IRC and/or documentation for topics like this.

mrupsidown’s picture

Wow! 3 paragraphs to give no information at all.

knalstaaf’s picture

Maybe mrupsidown should take the effort to read through the topic. It's full of advice, way too full actually.

Praveen Dhyani’s picture

What I have to edit in this code, Its page.tpl.php in Pixture Reloaded theme. Using Drupal 7.7

<div id="page" class="container">

  <header id="header" class="clearfix">
    <div id="branding">
      <?php if ($linked_site_logo): ?>
        <div id="logo"><?php print $linked_site_logo; ?></div>
      <?php endif; ?>
      <?php if ($site_name || $site_slogan): ?>
        <hgroup<?php if (!$site_slogan && $hide_site_name): ?> class="<?php print $visibility; ?>"<?php endif; ?>>
          <?php if ($site_name): ?>
            <h1 id="site-name"<?php if ($hide_site_name): ?> class="<?php print $visibility; ?>"<?php endif; ?>><?php print $site_name; ?></h1>
          <?php endif; ?>
          <?php if ($site_slogan): ?>
            <h2 id="site-slogan"><?php print $site_slogan; ?></h2>
          <?php endif; ?>
      <?php endif; ?>
    <?php print render($page['header']); ?> <!-- /header region -->
    <?php print render($page['menu_bar']); ?> <!-- /menu bar -->
  </header> <!-- /header -->

  <?php print $breadcrumb; ?> <!-- /breadcrumb -->
  <?php print $messages; ?> <!-- /message -->
  <?php print render($page['help']); ?> <!-- /help -->

  <?php print render($page['secondary_content']); ?> <!-- /secondary-content -->

  <!-- Three column 3x33 Gpanel -->
  <?php if ($page['three_33_first'] || $page['three_33_second'] || $page['three_33_third']): ?>
    <div class="three-3x33 gpanel clearfix">
      <?php print render($page['three_33_first']); ?>
      <?php print render($page['three_33_second']); ?>
      <?php print render($page['three_33_third']); ?>
  <?php endif; ?>

  <div id="columns"><div class="columns-inner clearfix">
    <div id="content-column"><div class="content-inner">
      <?php print render($page['highlight']); ?> <!-- /highlight -->
      <?php $tag = $title ? 'section' : 'div'; ?>
      <<?php print $tag; ?> id="main-content">
        <?php if ($title || $tabs = render($tabs) || $action_links = render($action_links)): ?>
          <header class="clearfix">
            <?php print render($title_prefix); ?>
            <?php if ($title): ?><h1 id="page-title"><?php print $title; ?></h1> <!-- /page title -->
            <?php endif; ?>
            <?php print render($title_suffix); ?>
            <?php if ($tabs = render($tabs)): print $tabs; endif ?> <!-- /local task tabs -->
            <?php if ($action_links = render($action_links)): ?><ul class="action-links"><?php print $action_links; ?></ul><?php endif; ?> <!-- /action links -->
        <?php endif; ?>
        <?php print render($page['content']); ?> <!-- /content -->
        <?php print $feed_icons; ?> <!-- /feed icons -->
      </<?php print $tag; ?>> <!-- /main-content -->
      <?php print render($page['content_aside']); ?> <!-- /content-aside -->
    </div></div> <!-- /content-column -->
    <?php print render($page['sidebar_first']); ?>
    <?php print render($page['sidebar_second']); ?>
  </div></div> <!-- /columns -->

  <?php print render($page['tertiary_content']); ?> <!-- /tertiary-content -->

  <!-- Four column Gpanel -->
  <?php if ($page['four_first'] || $page['four_second'] || $page['four_third'] || $page['four_fourth']): ?>
    <div class="four-4x25 gpanel clearfix">
      <?php print render($page['four_first']); ?>
      <?php print render($page['four_second']); ?>
      <?php print render($page['four_third']); ?>
      <?php print render($page['four_fourth']); ?>
  <?php endif; ?>

  <?php if ($page['footer'] || $feed_icons): ?>
    <footer id="footer"><div id="footer-inner" class="clearfix">
      <?php print render($page['footer']); ?> <!-- /footer region -->
    </div></footer> <!-- /footer/footer-inner -->
  <?php endif; ?>

</div> <!-- /page -->

edited by silverwing - added code tags

new123456789’s picture

This removed all the blocks from the Content region on my homepage... :S

bpnet’s picture

instead i use $is_front variable, just to avoid function overhead since variable is already available in page.tpl files.

DavidHadaller’s picture

Further to Meepu's code, I wanted to remove just the "No front page content..." message, but keep the blocks I have set to display on the front page in the content region.

My experience was Meepu's code removed all content, to remove just the message I snipped the $page array as follows (Drupal 7 only).

if(!empty($page['content'])) :

 if(drupal_is_front_page()) {
print render($page['content']);


I found this part of the array by adding var_dump($page); to explore the array. Or better yet, with the devel module enabled: kpr($page);

Note: I am no D7 expert, so this may not be the best way of doing this.


blackembrian’s picture

This seems to work fine for the zen theme too

mrupsidown’s picture

The unset solution works fine. You can do that in theme_preprocess_page. Thanks.

dquark3’s picture

Thank you all for this much needed solution. To combine what Meepu and DavidHadaller have done in D7, I personally have used and like two edits in my theme's 'page.tpl.php' template:

1.) To remove the default message, anywhere within the page is added

<?php if(drupal_is_front_page()) {unset($page['content']['system_main']['default_message']);} ?>

2.) To remove the default page title,

<?php if ($title): ?> is changed to
<?php if ($title && !drupal_is_front_page()): ?>

Alternatively, one could use a template override ('page--front.tpl.php') and specify this output to be omitted.

itserich’s picture

Thank you dquark3.

Adding that line in #1 to page.tpl.php worked in the Danland theme.

Making a "fake" blank front page as suggested by others would be easy, but I am not sure how the front page is used throughout Drupal. For instance, will this upset when used in menus and blocks?

dontayeb’s picture

Simply as ABC 123 thanks dquark3....did both #1 n 2 and removed both the message and th page title

KarinW’s picture

Thank you, that's the solution that works for me.

akash_agrawal’s picture

It worked like charm!!

mahmost’s picture

About Meepu's trick to wipe out the title in the front page, I think it is better to edit template.php as told in this post by adding this to yourthemename_process_page

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

If you copied your theme from bartik , then page.tpl.php will put the site name in an h1 tag (I think it's better for SEO to have an h1 tag in the page)

And so, it is maybe better to do so for DavidHadaller's trick too, it 's all in one file (template.php) and one function (yourthemename_process_page) by just prepending this to the function code:

if (drupal_is_front_page()) {


  • Unsetting the title may cause a php error because it's checked latter on.
  • It's maybe better not to unset the other default_message too, for me it worked by making it empty as well.
  • I think you may add these lines in to yourthemename_preprocess_page rather than yourthemename_process_page but not sure about that.
eli-f’s picture

@Meepu and MahmoudMostafa, thanks for the snippets.

@MahmoudMostafa I used the

 if (drupal_is_front_page()) {

snippet first in a preprocess function and then in a process function. Both worked. I am not sure which is optimal/ how they differ exactly in rendering the page.
So far no errors, but we'll see ... :)

kvvnn’s picture

Go to Structure - Blocks - Main page content - configure - set it to not show on

The message now appears under where it previously appeared.

gforce301’s picture

Did you plan on having a blank front page on your site? If not then one of the two standard methods (to be read "designed that way intentionally") should suffice for replacing the default "No front page content has been created yet" message. Lets recap:

  1. Create a node. Any type will do. Promote that node to the front page. Problem solved.
  2. Create a node. Any type will do. Set that node as the default front page. Problem solved.
MorganG’s picture

That works, except for one thing. How do i remove the node title?

gforce301’s picture

custom theme template

spacereactor’s picture

i just add #first-time {display:none;} in the template css or use css injector

bike2live’s picture

spacereactor's solution worked for me. As a newby and after reading a few of the "it's designed that way" comments, I wonder if I created my theme and/or placed my content in the wrong regions. My home page is designed to have a carousel at the top left with something in the right side column. Using ddblock (and views) I created a carousel and plopped that into the content region. So it shows up on the home page (only) but I still got the "No front page content has been create yet." message.

So... is there a better way to do this so core knows about my content?

gforce301’s picture

Read this comment again:

Make a PAGE for your home page. Set that page as the front page. Now "core knows" about your content. You can even leave the page blank if you really desire. The point being, the default front page is an aggregated page of other content. So the reason "core" doesn't know about your front page content is because you don't have any. So make some.

meta_state’s picture

Adding this code to my sites css has worked for me

#first-time {display:none;}

Kudos Spacereactor! :D

luco’s picture

@gforce301 that works the same way as Wordpress themes which have slideshows built into them.

in other words, it's the right result in the wrong place.

there should be a way to switch it off in Site information. a simple checkbox like "don't display that message" or even a way to change it.


"There is no off position on the genius switch."
- David Letterman

debacac1’s picture

Just a quick question for you as I totally get what you are saying and know that this is the correct way of going about this.

My question is, I accidentally deleted my about_us page that had dependent/drop down nodes/links on it. So I've already changed the links to be independent and tried to find the page that it keeps defaulting to so that I can design it but it is no where to be found. It's not under content. So I did step number 2 that you mention above and set it to default front page and it still coming up

REALLY frustrating. I've tried some of the other steps as well but the same issue.

Any suggestions would be great!

luco’s picture

that's an interesting approach. I tried it, but it didn't work.

on the "there's a module for that" department, try this: :)


"There is no off position on the genius switch."
- David Letterman

vande’s picture

recently, I got challenged with this case.
I finally solved this with a new template.php.
Duplicate page.tpl.php with a new name, page--front.tpl.php. (usually in active themes)
remove any

which responsible for generating content.
Perhaps, that's what you need :)
marcnischan’s picture

The Main Content node is a block. If you go to Structure>> Blocks you can see it. However, unlike when you assign regions for the other blocks, it won't have a -none- field in the dropdown. If you click on "configure" in the right hand column though, you will find the Region Settings for the theme and you can select -none- in that dropdown.

itserich’s picture

I noticed that.

Tried it, and when I try to save Block:

Region for Main page content block field is required.

With Danland theme.

marcnischan’s picture

What you should do then is to:

1) Create a view that is a page (Structure >> Views +Add new view. Click +Add and select Page from the menu that show up)

2) Have it display the kinds of content you want on your homepage (use the filter criteria)

3) Designate it as the home page (under PAGE SETTINGS set Path: to front-page)

Now that view will be your front page, and you won't have to deal with the message.

itserich’s picture

I ended up using the solution by dquark3 above.

I use <front> throughout my site so do not want to set up a fake front page.

Simple and Straight Forward
Posted by dquark3 on March 1, 2011 at 2:56am 
tomas.teicher’s picture

I did it in administration. I have configured block Main content visibility: display on each page except <front>

//edit> I am sorry, this doesn't work

10kinds’s picture

Like a couple of posts mentioned before, use the drupal_is_front_page method. I left my statement empty. If you don't like leaving statements empty, then just have it return a null variable.

if (drupal_is_front_page()) {} else{print render($page['content']);}

quardz’s picture

Install this module and create a Empty call page menu link, And use the link as home page in "admin->settings->site information"

marafee1243’s picture

Just add this code to the page.tpl.php or page--front.tpl.php on Drupal 7.


<?php print render($page['content']); ?>
and replace with below code.

<?php  if(drupal_is_front_page())
			print render($page['content']); 

And i believe you surely get all blocks or contents you posted on page.

and to remove page title on page like

Welcome to "website name"

find this code on page.tpl.php or page--front.tpl.php

<?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>

and you can remove this code or else just make a comment

over <?php //print $title; ?>

jibran’s picture

function template_preprocess_page(&$vars, $hook) {
  if (isset($vars['is_front']))
MarvinLeRouge’s picture

Works perfect for me, thanks !

timodwhit’s picture

worked great for me. Edited it slightly:

  if (isset($variables['is_front'])){

Also, fair warning to noobs (I speak as one): Make sure to rename 'template' to the name of your theme. Also. make sure you aren't calling "template_preprocess_page" earlier in the document (gave me a 5 minute headache.) :-)

alomedia’s picture

This worked fine for me. Thanks! :)

wooody’s picture

Thanks , worked fine too.

struess’s picture

With Drupal 7 and Danland theme, these instructions worked perfectly. Thanks!

edit: just to be clear, I followed marafee1243's post (October 27, 2011) to the letter.

rwgeorge’s picture

Thank you very much!!! I have been struggling with this and now it works perfectly in my AT-Commerce theme.
Getting rid of the mandatory "title" or "welcome to" makes the front page so much more elegant.

ahhao’s picture

How To Hide / By Pass the "Welcome to XXX" "No front page content has been created yet" in your drupal front page

This message / content appeared when you have nothing publish in front page.



For Drupal 7 :

1) Install View.

2) Go to (path)#overlay=admin/structure/views. (Structure > Views)

3) Make sure the VIEW NAME template "Front page" is enabled.

4) Go to (path)#overlay=admin/config/system/site-information (Configuration > (System) > Site information)

5) Key in "frontpage" to Default front page setting.

6) Save

You can promote / publish / demote your post,content,page in your front page ANYTIME
I am sure u can get the satisfied result.

ronnienorwood’s picture

@ahhao perfect...thanx.

dkgiles’s picture

Bingo! -thanks

// darren

yrret’s picture

I wish this was posted on every thread about this, and stickied at the top.

talulah’s picture

Wow, thanks! I had to delete this and redo it twice before it took (followed same steps each time). Maybe I needed to clear out my cache before it took?!

Either way, thanks for the very simple instructions. I agree, this should be sticky on the top of EVERY ONE of the dozens of messages about this topic.

ronaldmulero’s picture

Drupal 7.22
I would just add that you need to include additional steps between Step 3 and Step 4:

  • Edit the View.
    • Edit the "Filter Criteria" of the View for all displays.
      • Content: Promoted to Front = No
      • Content: Published = No
    • Edit the "Feed Settings" of the "Feed" display of the View.
      • Attach to: (uncheck "Page")
  • Save
      Even if you don't do the above edits, you need to save the View at least once, or else Step 5 will fail.
knalstaaf’s picture

What if a client actually hàs unpublished content, which is quite common?

A more water proof filter would be Content: Type = is none of (all content types checked).

This can easily be done within seconds with a brand new view. Make a View Page, apply the filter criteria with Content: Type and give it a path which you will use in your website information settings.

Or check this clever approach.

Done and done.

fhdrupal’s picture

No matter what i do, i promote view, block, contents or panel to the front page or changed default page in site information. But when I visit it shows that message.

no idea how to disable that node without id? Please help.

Argus’s picture

Using Views was already mentioned by mikib and by marcnischan and, although a very simple one, is by far not the "ONE AND ONLY DON'T CHANGE ANY CODE' solution you suggest to the problem most novice Drupal users face. There is nothing wrong with changing code in the theme layer, just don't hack Drupal core.

Nobody wants an empty frontpage. Drupal assumes you create content, once you do so the message disappears automatically. By default Drupal displays all nodes that receive the "promote to frontpage" setting. This leaves you with a blog-style list of teasers of all published nodes. Often this is not the required outcome for a frontpage. This thread suggests some alternatives:

You can create a page, say a basic page content type, call it "My Default Homepage" then go to ../admin/config/system/site-information and set that page as Default frontpage. This is what gforce301 suggests. Most users then want to remove the page-title which leaves them with yet another problem.

You can use one of the many modules that provide a solution: Front, Empty Page, Empty Front Page and I'm sure there are a few others if you search for it.

You can use Views to create a query listing content, display it on a page, give that page a path, and set that path to be the default frontpage. Basically this is what the comment I reply to suggests.

And then there are the theme layer coding solutions. dquark3's solution changing a few lines in your theme's page.tpl.php, MahmoudMostafa's solution to use a preprocess function added in template.php, and vande's solution to use an other page altogether. You then still have to create content for the homepage. :)

All in all this underlines one of the difficulties for novice Drupal users, there are numerous solutions to a problem, and you have to know what Drupal presumes. The original question has been well answered but we keep repeating ourselves because people don't read what others have written.

ahhao’s picture

Thank you Argus, you are nice man~~
i rather name it to "welcome" than formal name (frontpage,front,default,etc... ). ^^

BTW, sometime i am lost my way while searching solution in deeper forest.
Complicated and "TOO" much information, some are duplicated one...

indigetal’s picture

Thank you Argus for that brilliant summary, I have created a wiki at my group Students of Drupal and copied your post into it. This is one of the topics that everyone will have to learn early in their drupal career and you've done an excellent job of summarizing this long-winded discussion, we need more posters like you. Also thanks to everyone else who contributed the various solutions to this problem.

sparlez’s picture

D7-adaptive theme-corolla subtheme
Edited page.tpl.php

Pasted this in the first line:

<?php if(drupal_is_front_page()) {unset($page['content']['system_main']['default_message']);} ?>

Changed this:

<?php if ($title && !isset($node)): ?>
              <header class="clearfix">
                <h1 id="page-title"><?php print $title; ?></h1>

For this:

<?php if ($title && !drupal_is_front_page()): ?>

I just wanted to thank you for sharing your knowledge.

richard2233’s picture

As said above, use
No coding install the module, enable it, job done!

barrabasah’s picture

it's work fine i paste in place - page.tpl.php

print render($page['content']);


if(!empty($page['content'])) :

if(drupal_is_front_page()) {

print render($page['content']);

browneandrae’s picture

Put it in a block you do not need, css hide the block

damupi’s picture

As i see on this tutorial (minute 18 about) you can add this to the template.php

function pruebas_preprocess__page (&$vars,$hook) {

Hope it helps

odonel’s picture

The way I removed mine was simply edit modules/node/node.module

around line 2622, I just changed that line from the "no front page message" to ''

$default_message = '

' . t('') . '


WorldFallz’s picture

...simply edit modules/node/node.module...

just a follow-up for any newbies that may stumble across this post-- modifying core is never a 'correct' answer. And simple is in the eye of the beholder-- it may seem simple, but when at some point those 'simple' core changes get wiped out by a routine upgrade and you either don't remember or can't figure out what happened then it's anything but 'simple', lol. Typical example of pennywise and pound foolish.

knalstaaf’s picture

While it's currently a default behaviour of a Drupal installation, I think it should be taken into consideration to allow the admin to switch this off (D8 maybe).

One solution could be: drop this in a block that is switched on by default (in the block admin page), thus the admin can remove this block if deemed necessary.

I do believe this may be an issue (if you can call it that) for many developers.

timodwhit’s picture

...edit modules/node/node.module

Just to reiterate and beat a dead-horse and circle back: This is a huge no no.

While this may be the way to go about getting a task done in other systems, editing core in Drupal is against all Drupal standards. I think it is safe to assume that people who are looking at this post are fairly new to the Drupal world and looking at different means of content population on the site. Use one of the many numerous answers above, follow some tutorials, search for hours, but do NOT edit core unless there is no other Drupal means of getting the job done.

jarimos’s picture

You find the file




now open the file and inside, find the text 'No front page content has been created yet.'

you should find this line

$default_message = '

' . t('No front page content has been created yet.') . '


now delete the text
No front page content has been created yet.

so you have this line when you are finished

$default_message = '

' . t('') . '


(remember to leave the simbols around the text
inside t(''))

save the file and refresh your browser....magic :D have a nice day

note: i recommend you to have an edit program to open code files, like notepad++. Its totally free and works perfect for drupal.

WorldFallz’s picture

uh no... this is not recommended. Please don't recommend poor practice in the forums. You only end up doing more harm than good to newbies.

sonapie’s picture

1. Firstly, I created a new content (Basic Page) with the body content empty and title: home.
2. Then, I went to Configuration > Site Information > Default front page end placed my new page's alias (http://mysite/en/home)
3. I created the Views I needed as blocks and placed them in certain regions configurating them to be visible only in frontpage () (more info on theis in Views Slideshow tutorials)
4. I added some code in pge.tpl.php for the page Title (home) not to be printed ( I use the Bartik theme):

<?php if ($title && !drupal_is_front_page()): ?>
        <h1 class="title" id="page-title">
                <?php print $title; ?>
<?php endif; ?>

(explaining code: I replaced the if ($title): for the if ($title && !drupal_is_front_page()): as said by Meepu on February 10, 2011 at 5:18pm)

I hope this to be helpful for some, as previous post where helpful to me :)


knalstaaf’s picture

@sonapie: If you want to edit the page.tpl.php of Bartik (which is a core theme), copy the Bartik folder to your sites/all/themes folder and edit that file over there. If you don't, all your edits will be cleared with the next core update.

Personally I think there are better practices mentionned in this thread, but if it floats your boat...

midovgt’s picture

here is the way to hide the message : no front page content .....

in your css file add this code :

#first-time {
display: none;

nd to hide to title in your front page use this :
in your template.php file, just add this :

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

have a nice day.

chichio9000’s picture

Worked with me.

thumbslinger’s picture

I think needs a "Like" button!

tomhung’s picture
Original: No front page content has been created yet.

Done! Message is gone!

henns20’s picture

here it is using php in the template.php

function youthemename_preprocess_page(&$variables, $hook) {
if (isset($variables['is_front'])) {



function yourthemenam_preprocess_page(&$variables, $hook) {
if (isset($variables['is_front'])) {


f0ns’s picture

Add this to your page preprocess function in your theme:

if (isset($variables['is_front'])) {

Drupedia, the drupal knowledgebase:

DYdave’s picture


Davyin Internet Solutions - Drupal in China

marco.b’s picture

There are 2 Modules to solve that:

I use successful empty_page.

– Greetings from Frankonia –
"A decision is mostly good decision if it leads to more opportunities.”
Heinz von Foerster (Kybernetiker)

wusel’s picture

awebmanager’s picture

I did it by creating a page view with a filter that would never produce any content (I made a condition that the NID of the node to show in the view should be 99999999999) and set its path as /home, and then set the default front page in "site information" to /home.

Normally I wouldn't need to do this because I'd make a legitimate custom view for the home page, or just use a basic page, but in this case the site didn't actually require either. Which is perhaps odd.

knalstaaf’s picture

That's quite clever. It's even more waterproof if you set the nid-value to be "x", which is never going to happen since alphabetic characters don't occur as node ID's.

EmilSamson’s picture

Just add these lines to your page.tpl.php, just below the commended area.

     $page['content']['system_main']['default_message'] = array(); // This will remove the 'No front page content has been created yet.'

well it's not mine solution, but I have found it somewhere and other post, and now can't find where it is from.

If you do not have page.tpl.php in your subtheme, you have to find it in the core theme, and then copy it to the same location as core theme, to your subtheme.

In AT it's /templates/page.tpl.php

it means that in your Adaptive theme subtheme you have to create folder named "templates" and then copy there page.tpl.php and then delete the part of code mentioned above.

It's important that you do not make any changes to the Core theme!

windrainer’s picture

Just in case some one want to remove the 'welcome message' as well, this is what i did

 * Implements hook_process_page().
function haiou_process_page(&$var) {
 $is_front = $var['is_front'];
  if($is_front) {
    $node = menu_get_object();
    if(!$node) {
      $var['title'] = '';

this is the theme_process_page function, replace the 'content_top' by your region's name , normally it should be 'content'. clear the cache then the message should be gone.

wusel’s picture

You only have to add some normal content after a fresh install of drupal7, which is visible at the homepage.
Then this is visible at the homepage of your new drupal-website.


raspi’s picture

Chris Happy’s picture

Just add this code to your source file or through CSS injector:

.front #main-content {
display: none;

angel.angelio’s picture

In Drupal 8 there's a View that generates this content. You can find it at admin/structure/views/view/frontpage. Also, the twig file for that view is located at drupalroot/core/views/templates/views-views.html.twig, copy it to your theme so you can modify it.

bbu23’s picture

The easiest way would be to create an empty basic page and go to the site settings and set the new node as frontpage. Works for both Drupal 7 and Drupal 8.

Aezarien’s picture

(Drupal 7) In local.css of your theme/css:

#first-time, .front h1#page-title{display:none;}

Hides all of that text, Welcome message and link to create content.
It's sort of an irresponsible way to handle items you want to "get rid of", but it is fairly predictable, easy, and easy to reverse. It is also easy for me to remember if/when I want to reverse it.

DYdave’s picture

Hi guys,

I would like to concur with previous comments, suggesting the module Empty Front Page as a potential solution for this ticket.
D7: The module is very clean, simple, lightweight and contains a single hook: hook_menu_alter. It overrides the path 'node''s page callback 'page callback' which returns an empty array.
Just enable the module (flush the cache if necessary) and the No front page content... should have disappeared.

D8: Project' page has some information about the D8 module, but I didn't have any chance to test it yet.
Would be glad to hear some feedback from anybody who's tested/worked with the D8 version.

Thanks very much to everyone for your testing, reporting, feedback and involvement in the Drupal community.

Davyin Internet Solutions - Drupal in China

shannoninman’s picture