Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By chanjay on
Hi,
I use Omega 4 subtheme and I would like remove the "Welcome" & "No Content is created" messages at front page.
Here is my template.php file:
function MYTHEME_preprocess_page(&$vars) {
if (drupal_is_front_page()) {
unset($vars['page']['content']['system_main']['default_message']); //will remove message "no front page content is created"
drupal_set_title(''); //removes welcome message (page title)
}
}
I got blank white page after implementing this.
Any idea?
Thanks.
hc.
Comments
Try changing this:
Try changing this:
To this:
It still doesn't work.
It still doesn't work.
This is so weird, I used the same code on different project before (but not using Omega theme) and it worked.
hc.
Sorry, there was an error in
Sorry, there was an error in my suggested replacement. I have edited my post, try my suggested code now.
Jaypan, Thanks but I still
Jaypan, Thanks but I still see blank white page on this code.
hc.
What's the output if you do
What's the output if you do the following:
The below code produces blank
The below code produces blank white page.
But the below code (removed "preprocess")
produces the results as follow over blank white background.
hc.
Ok, we're getting closer.
Ok, we're getting closer. Try this:
Now the welcome message, logo
Now the welcome message, logo, & slogan are all gone.
hc.
Can't help beyond that. I don
Can't help beyond that. I don't see any reason why your logo and slogan would be removed by that.
Thank you Jaypan I appreciate
Thank you Jaypan I appreciate your time & efforts to help me.
hc.