title: PHP Conditional for html code block not quite working - Wordpress
body: <p>My goal is that I am only wanting a child menu to show on certain pages.</p>
  
  <pre><code>&lt;?php if ( $post-&gt;post_parent == 'gallery' || $post-&gt;ID == 72 || $post-&gt;ID == 77) : ?&gt;
  &lt;nav id="childnavtop"&gt;
      &lt;div class="maxwidth"&gt;
      &lt;ul&gt;
          &lt;?php $childnavargs=array('child_of' =&gt; get_top_ancestor_id(), 'title_li' =&gt; '');?&gt;
          &lt;?php wp_list_pages($childnavargs);?&gt;
  &lt;/ul&gt;
  &lt;/div&gt;&lt;!--/.maxwidth--&gt;
  &lt;/nav&gt;&lt;!--/.childnavtop--&gt;
  
  &lt;?php else : ?&gt;
      &lt;span&gt;testing to see if it works.&lt;/span&gt;
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>The first conditional statement isn't quite working.  I don't want any of the html code to show up.  The menu appears and disappears on specific pages as I want, but the html code for  still shows up on every page.  I figure that I am not gracefully getting in and out of PHP properly.  How can I get the entire block of html to not show up?</p>