title: How to Display a Custom Field Value of a Taxonomy in Post Page?
body: <p>This seems very straight forward, but I can't get it to work even after going through the documentation (and a number of questions in this site) multiple times. </p>
  
  <p>I have a custom post type called <code>comic</code> with a taxonomy field (type radio button) called <code>book</code>. The <code>book</code> taxonomy has a text field called <code>book_title</code>. I'm trying to display the value of <code>book_title</code> in <code>single-comic.php</code>. </p>
  
  <p>This is what I've done so far: </p>
  
  <pre><code>&lt;?php 
  $term = get_field('book');
  if( $term ): ?&gt;
  &lt;h1&gt;&lt;?php echo $term-&gt;book_title; ?&gt;&lt;/h1&gt;
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>This results in an empty <code>h1</code> element, which suggests that <code>$term</code> returns <code>true</code>. Also, echoing <code>$term</code> returns <code>9</code> which I believe is the number of fields (default and custom) associated with <code>book</code> taxonomy. This means that I'm getting the correct object. I'm just unable to use it to display the values of its fields. </p>