views:

92

answers:

2

I'm new to Wordpress plugins, and editing someone else's to add functionality. I need to retrieve the tags for a particular post.

The get post function is already in use inside the plugin and returns category information. Unfortunately nothing is returned for tags.

The get the tags function appears to be most appropriate but it only runs inside the Wordpress loop. My understanding is that plugins run outside the loop.

I haven't found anything else in the API reference.

How is it possible to retrieve the tags for a post?

A: 

http://wordpress.org/support/topic/191245

A couple of solutions behind that link.

Lista
+2  A: 

Try this

get_the_tags($post->ID)
Sudar