I'm trying to get a client's "Blog" page to display a different right sidebar than the rest of the pages. I entered this into the page.php file of the template:
Where it used to say:
<?php include ('sidebar2.php'); ?>
I changed it to:
<?php
if (is_page("blog")) {
echo '<?php include ('sidebar2.php'); ?>';
} else {
echo '<?php include ('sidebar3.php'); ?>';
}
?>
This code was taken directly from a site that it works on. All I changed is what is in the echo '' part and removed some elseif lines.
Can anyone tell me why this isn't working? I think it's because I have <?php ?> in there more than once but don't know how else to write it.
Thanks