I've been trying this for hrs

<?php

if ($_SERVER['SERVER_NAME']=='http://www.testground.idghosting.com/idi' && $_SERVER['REQUEST_URI'] == 'our-production/') {

         echo '<div id="services">
<h1>Our services</h1>
<a href="<?php bloginfo(\'url\'); ?>" id="serv_productions" title="Our Productions"><span>Our Productions</span></a>
<a href="<?php bloginfo(\'url\'); ?>" id="serv_services" title="Production Services"><span>Production Services</span></a>
<a href="<?php bloginfo(\'url\'); ?>" id="serv_equipment" title="Equipment &amp; Facilities"><span>Equipment &amp; Facilities</span></a>
<a href="<?php bloginfo(\'url\'); ?>" id="serv_pr" title="PR &amp; Media"><span>PR &amp; Media</span></a>

</div>';
     } else {
         echo '<div> do not show</div>';
     } ;
 ?>

but no luck... an aid could be greatly appreciated..

That's not going to match because $_SERVER['SERVER_NAME'] is only the domain title from the server, not the url itself.

A few of the products within the $_SERVER array that might be useful for you:

  • SERVER_Title The entire domain title from the server performing the script (eg myserver.foo.com)
  • REQUEST_URI The area of the URL which comes following the server title, such as the query string (if any)
  • SCRIPT_Title The area of the URL following the server title, excluding the query string.

One factor I love to do to handle code that will get performed for development and this is not on an active website is to produce a define in line with the hostname.

For instance:

define('IS_LIVE', (strstr($_SERVER['SERVER_NAME'], 'mytestserver') ? true : false));

Basically put that comprise somewhere that will get known as for each page, then elsewhere during my code, I'm able to do that:

if(!IS_LIVE) {
  //Do development-debugging stuff
}

Use

if(substr($_SERVER["REQUEST_URI"], 0, 4) == "/idi" //followed by your other code

You might also need an additional semi-colon:

</div>';
  } else {
      echo '<div> do not show</div>';
  } ; 
//  ^ remove this semi-colon

I've the answer....

<?php
//use body ID to whick page you want to dipaly a block
if (is_page(array('bodyid','bodyid', 'bodyid'))) { ;?>

<div id="services">
<h1>Our services</h1>
<a href="<?php bloginfo('url'); ?>" id="serv_productions" title="Our Productions"><span>Our Productions</span></a>
<a href="<?php bloginfo('url'); ?>" id="serv_services" title="Production Services"><span>Production Services</span></a>
<a href="<?php bloginfo('url'); ?>" id="serv_equipment" title="Equipment &amp; Facilities"><span>Equipment &amp; Facilities</span></a>
<a href="<?php bloginfo('url'); ?>" id="serv_pr" title="PR &amp; Media"><span>PR &amp; Media</span></a>

</div>
<?php } ?>