Support

Account

Home Forums General Issues Get terms name selected in taxonomy field

Unread

Get terms name selected in taxonomy field

  • I have a taxonomy field set to object terms and I want to get only selected terms name.
    This is my code:

    	$tag_edizioni = get_field('tag_edizioni_serie', $post_id);
    			
    	if( $tag_edizioni ):					
    	foreach( $tag_edizioni as $tag_edizioni ):
    
    	$tag_edizioni_nome=$tag_edizioni->name; 
      
    	endforeach;
    	endif; 
    

    This returns all name of taxonomy and not the selected ones.

    Thanks

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.