Getting a taxonomy term for the current post in wordpress

I’m trying to populate a form value field with a taxonomy term associated with the current post,

I must have tried 20 things but cant find the right solution .?

Read More

I have meta fields but that’s easy I have just used this:

$ref = get_post_meta( $post->ID, 'job_ref', true ); 

and this for the form field:

  <input type="text" class="text" name="job_ref" id="job_ref" value="
  <?php echo $ref; ?>" /> 

So I’m looking for a similar solution for a taxonomy term ..?

Many thanks

Related posts

Leave a Reply

2 comments