Hi
I'm writing a template that applies to several pages. The idea is to perform different actions based on the value of wp_title('',false).
But I'm stuck because I can't seem to compare the page name generated by wp_title with other strings
Code:
<?php
$pagetitle = wp_title('', false);
if ($pagetitle == "About") :
?>
etc
<?php endif; ?>
I'm actually using a switch statement but the problem is the exactly the same in if.
The only thing I can think of is that perhaps the value returned in $pagetitle is not really a text string? (Although I can echo it as one perfectly well!) If it isn't text, is there a way of converting it into text?
Thanks!