On the single-post page within the loop I need an array of the_tags() which is a string. and get_tags() gives me all of the tags not only this posts. Is there an easy way to get this?
Leave a Reply
You must be logged in to post a comment.
On the single-post page within the loop I need an array of the_tags() which is a string. and get_tags() gives me all of the tags not only this posts. Is there an easy way to get this?
You must be logged in to post a comment.
the function
get_the_tags()
does for a single post, whatget_tags()
does for the site.you can use wp_get_object_terms() function: