I have been trying this for hours
<?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 & Facilities"><span>Equipment & Facilities</span></a>
<a href="<?php bloginfo('url'); ?>" id="serv_pr" title="PR & Media"><span>PR & Media</span></a>
</div>';
} else {
echo '<div> do not show</div>';
} ;
?>
but no luck… a help would be very much appreciated..
That’s never going to match because $_SERVER[‘SERVER_NAME’] is just the domain name of the server, not the url itself.
Some of the items in the $_SERVER array that may be of use to you:
One thing I like to do for handling code that gets executed for development and not on a live site is to create a define based on the hostname.
For example:
If I put that define somewhere that gets called for every page, then elsewhere in my code, I can do this:
You also have an extra semi-colon:
Use
I have the solution….