Show Block only if it's a front page and GET variable is set I am setting up a block in Drupal 7 to "show block on specific pages" through PHP.

What I want is that if it's a Front page and there is a GET (listed) variable, only then it shows the block otherwise not.

Hence, the block would only be shown, if the url is www.site.com/?listed=true

I tried this, but it doesn't work:-

&lt;?php
if ( (drupal_is_front_page()) &amp;&amp; ( !empty($_GET['listed'])  ) {
  return true;
}
?&gt;


any idea?
You missed a closing bracket. Try this:

&lt;?php
if (drupal_is_front_page() &amp;&amp; !empty($_GET['listed'])) {
  return TRUE;
}
?&gt;


or

&lt;?php
if (drupal_is_front_page() &amp;&amp; isset($_GET['listed'])) {
  return TRUE;
}
?&gt;