List all the tags from a custom post type

I’m looking for solution that will display all the tags that are used on a custom post type. I just want to list them all because I’m going to add jQuery code on each tag. 🙂

2 s
2

wp_get_object_terms will have your answer.

wp_get_object_terms( $post_ids, 'post_tag', $optional_args );

There is also get_the_terms which is simpler but also gets the job done.

get_the_terms( $id, 'post_tag');

Leave a Comment