By giarca on
Simple way to fix that problem without installing modules or promote another page to frontpage.
Search in the page.tpl the line
<?php print $content; ?>
and replace with
<?php if (!drupal_is_front_page()) { ?>
<?php print $content; ?>
<?php } ?>
In this way I have my frontpage free from the default welcome message but with all the other thing.
The same way can be used to remove any - print $something - line from the frontpage.
Hope it can be useful! Bye!
Comments
thanks giarca!
This is exactly what I needed.
cheers
Oh thank you
I needed that so badly. This is a very simple and usefull trick.
Thank you!
That worked liked a charm.
Nice, works also for drupal
Nice, works also for drupal 6.x
Thanks
Worked perfectly
Thanks a lot for this easy
Thanks a lot for this easy fix :)
CSS Way
I m not to familiar with php
I m not to familiar with php . I have this in my page.tpl
I m not sure how to change it . I would appriciate any help.
edited by silverwing - added code tagcleaner way to do it without
cleaner way to do it without functions, and using coding tpl standard
Drupal 7
This method is not compatible with Drupal 7.
Is there an alternative method for this in Drupal 7?
Did you try the CSS Way from
Did you try the CSS Way from xenowing? That worked for me in D7 - thanks xenowing!
Remove messages when no node promoted to front page
If you're looking for how to do this in Drupal 7 and you come to this thread, check out Meepu's comment at http://drupal.org/node/1049290#comment-4074418 - works like a charm to remove both the 'Welcome to XXX' and 'No front page content has been created' messages on the home page.
I'm using Drupal 7 and here is my page.tpl.php
What should I modify to make that message vanish?
Could anyone please help? How
Could anyone please help? How can we easily remove the entire "Welcome to" section of the front page in Drupal 7? There has to be a simple way to do this, but there seem to be numerous threads and support topics, none of which applies to Drupal 7 or none of which actually works.
there is 2 ways to remove
there is 2 ways to remove this.
1. Quick n Dirty css hack
2. for the markup excentrics you can remove that with a little preprocess magick & unset the message
in template.php
the last is that this is gonna be added to the mothership theme, to get this problem outta the way once n for all
/morten.dk
http://geekroyale.com | http://morten.dk
Thank you very much Morten,
Thank you very much Morten, number 2 works like a charm.
Worked for me along with
Worked for me along with editing page--front to display no content.
D7 and D8
That all.
I tried that in my
I tried that in my template.php file but the "Welcome ... No front page content has been created yet." message is still there. Did I put this in the wrong file?
Function name
Did you replace "vadim" with the name of your theme?
Hope that helps
JK
Based off similar suggestions above
This removed both title and message from the front page,
Thanks a lot
The above code is perfect, which removed both the message.
Thanks a lot ...
Unfortunately this solution
Unfortunately this solution doesn't work for me. I'm using a custom subtheme of Omega and the name of my theme includes an underscore (ie: my_theme) and I have tried to write the function in different ways:
function my_theme_preprocess_page
function my-theme_preprocess_page
function mytheme_preprocess_page
The first seems the right one but I get only a blank page! Do I miss anything?
in omega for D7 i found
in omega for D7 i found this
region-content.tpl.php
should be
the only addition being hiding the title if page "is front"
***** FIX *****
this will only remove the title, and not section
in Omega 7.x.3
Create a subtheme, let's call it 'omsub', then on omsub/preprocess directory create a file:
preprocess-page.inc.
Inside the file:
PS: Please note that the php closing tag should be removed.
It works
This solution works for me when added to the template.php file in a zen sub theme.
Thanks!!
works for me
css works too.
body.front h1#page-title{
display:none;
}
not the right way
Using CSS is not the right way. Use Drupal API as much as possible.
drupal | father | husband | bike | beer
Module or Core
There are two ways of doing this.
The easy one: https://www.drupal.org/project/empty_front_page
In drupal you can find any module for what you need.
In the case you don't want to use the module you can modify the node core module in mysitefoldername/modules/node/node.module in the line 2719.
I do not recomend to modify core modules, but If you know what you are doing, do it.
Sorry for bad enlish, not native speaker.