php - Get the_terms names for current post id -
php - Get the_terms names for current post id -
this work me when want array includes names of taxonomy:
get_terms( 'portfolio-skills', array( 'fields' => 'names' ) );
what if want terms names associated current post. tried it's not working:
get_terms( 'portfolio-skills', array( 'fields' => 'names' ), 'include' => array( $post->id ) );
thank @pekka 웃, alter , it's working:
wp_get_object_terms( $post->id, 'portfolio-skills', array( 'fields' => 'names' ) );
php wordpress custom-taxonomy
Comments
Post a Comment