Hi guys I have some logic here that does not seem to be working for me. Currently I am trying to use two different stylesheets in wordpress. Here is the logic:
<?php
$url = "$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
if ($url=="theurl.com")
{
?><link rel="stylesheet" type="text/css" href="stylesheetforthispage.css" /><?;
}
else
{
?><link rel="stylesheet" type="text/css" href="stylesheetforotherpages.css" /><?;
}
?>
My problem is that the URL that I am trying to use the other stylesheet for is the homepage, and everytime I try this logic is does not seem to work? All help would be appreciated, thanks in advance!
1 comment