I am having trouble having to if statements on my body tag. The if statement i currently have is wordpress function:
This works fine. The problem is on 1 page I need to have "".
So what I did was wrap this in another if statement like so:
Apparently my syntax is wrong on the 2nd line, but I can't see why?
Can anyone see where I have gone wrong? Or is there an easier way to achieve this in wordpress?
Thanks in advance,
Dean
Code:
<?php echo is_single() ? "<body class='single'>" : "<body>" ; ?>
This works fine. The problem is on 1 page I need to have "".
So what I did was wrap this in another if statement like so:
Code:
<?php if(is_page('map')) : ?>
<?php echo "<body onload="initialize()">" ; ?>
<?php else : ?>
<?php echo is_single() ? "<body class='single'>" : "<body>" ; ?>
<?php endif; ?>
Apparently my syntax is wrong on the 2nd line, but I can't see why?
Can anyone see where I have gone wrong? Or is there an easier way to achieve this in wordpress?
Thanks in advance,
Dean