Hi, How to remove content on frontpage? I tried to disable print $content in page-front.tpl.php but it doesnt work.

thanks

Comments

dg@drupal’s picture

Not sure if it works. But can you try
if (!$is_front) print $content;

I used it in node.tpl.php to hide "posted by" and it works.

jeremycaldwell’s picture

Status: Active » Fixed

dg@drupal is correct! Make that change to the $content variable in your "page-front.tpl.php" and that will hide the content area on the homepage.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Chalaneru’s picture

This works too for Corporate Clean theme.
Thanks for your help, dg@drupal.

gismagnus’s picture

Actually, by default drupal shows last nodes added to your site (yoursite.com/node). And if you will hide $content variable template, drupal will still query nodes. You have to edit site frontpage default value in 'admin/settings/site-information'. Using hook_menu, you can set it to empty function returning nothing.