Jump to content

terriwun

New Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by terriwun

  1. I have a custom field where the user (wordpress admin) will check off the term name they want associated with a blog post. I currently get the term id returned. is there a way to get the slug as an end result?

     

     
    <?php 
      $term = get_field('acf_term');
    if( !empty($term) ): ?>
    <div> <asp_info> <strong>
    <?php $field_object = get_field_object( 'acf_term', $post->ID ); echo $field_object['label'];?></strong>
    <?php the_field('acf_term'); ?> </div>
    <?php endif; ?> 
     
    this returns : Term slug: 865
     
    I want it to return : Term slug: interest-tag-name
     
    Thanks for any help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.