title: hide or show a div in specific custom taxonomy category
body: <p>I've created custom post type as <code>single-service.php</code> and I have several custom taxonomies under service posts like <code>education</code>, <code>recruit</code> and <code>health</code>. </p>
  
  <p>I currently created some queries and under each query, I want to create a button which direct the users the contact form page of that service. It is like when you get into a single service page which is categorized under <code>education</code> there will a button directs them to education contact form page likewise for recruit page. </p>
  
  <p>I have tried below link but somehow it does not work. I am not sure whether I am using correct code or where do I make mistake</p>
  
  <pre><code>&lt;?php if (in_category( 'education', $post-&gt;ID )) : ?&gt;
      &lt;?php echo '&lt;div class="button"&gt;&lt;a href="#"&gt;Contact us&lt;/a&gt;&lt;/div&gt;'; ?&gt;
  
  &lt;?php elseif (in_category('recruit', $post-&gt;ID)) :?&gt;
      &lt;?php echo '&lt;div class="button"&gt;&lt;a href="#"&gt;Contact us&lt;/a&gt;&lt;/div&gt;'; ?&gt;
  
  &lt;?php elseif (in_category('health', $post-&gt;ID)) :?&gt;
      &lt;?php echo '&lt;div class="button"&gt;&lt;a href="#"&gt;Contact us&lt;/a&gt;&lt;/div&gt;'; ?&gt;
  
  &lt;?php endif;?&gt;
  </code></pre>