If You Need to Get Tags for a WordPress Post, use wp_get_post_terms

On a recent blog project, I had to output the tags for an post. I kept thinking the function would be like the_tags or something like that, but tags are referred to as “terms” in this case apparently.

So, use this function: wp_get_post_terms()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s