Check if the page is the front page in a template How do I make a simple front page check wich only shows a  in my template when the user is on the front page of the drupal website?

I tried this but it ended up crashing:

&lt;?php function drupal_is_front_page() {?&gt; &lt;h1&gt;TEST&lt;/h1&gt; &lt;?php } ?&gt;


Is this possible with a if instead of this function wich i found on the drupal website?

Thanks!
You should not declare a function in a Drupal template. Instead, you should just refer to that function:

&lt;?php
if (drupal_is_front_page()) {
    ?&gt;&lt;h1&gt;Test&lt;/h1&gt;&lt;?php
}
?&gt;