I tried doing an if statement, but it wrecks my page. Is my syntax wrong? I want it to display this code instead of the sidebar if the Single Post is in a Certain Category (66, 67 or 68) but to just load the normal sidebar if the post is in any other category.
What am I doing wrong?
This is what I tried, at the bottom of the page, after the post is listed:
<?php endwhile; else: ?>
<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?>
</div>
<?php if( is_category(array(66,67,68)) {echo '<div id="presssidebar"><p class="about_person_name">Press Room</p>
<p class="namendate2">Welcome to the NileGuide press room. We've compiled information about NileGuide that we hope you’ll find helpful. If you’d like further information about NileGuide, to set up an interview with NileGuide's CEO, or to see a demo of our site, please contact us via the information below.</p>
<p><ul><li><a href="#company description">What We Do</a></li><li><a href="#timeline">History/Timeline</a></li><li><a href="#pressreleases">Press Releases</a></li><li><a href="#inthenews">In The News…</a></li><li><a href="http://www.nileguide.com/pages/team.html">The Team and Board of Directors</a></li>
<li><a href="http://blog.nileguide.com">NileGuide Blog</a></li></ul></p>
<p><b>Kirstin Hornby</b><br />Director of Marketing<br /><a href="mailto:press@nileguide.com">press@nileguide.com</a><br />650-636-9369 x110</p>
</div>'; } else {get_sidebar();} ?>
<?php get_footer(); ?>