# Getting tags from post in plugin 'addPostTransformCallback(...)' function?

**URL:** <https://meta.discourse.org/t/getting-tags-from-post-in-plugin-addposttransformcallback-function/83678>\
**Category:** Development\
**Created:** [March 23, 2018, 8:35pm UTC](https://meta.discourse.org/t/getting-tags-from-post-in-plugin-addposttransformcallback-function/83678 "2018-03-23T20:35:33Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Anton](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anton/32/262773_2.png) [@Anton](https://meta.discourse.org/u/Anton)\
**Post date:** [March 24, 2018, 5:53pm UTC](https://meta.discourse.org/t/getting-tags-from-post-in-plugin-addposttransformcallback-function/83678/6 "2018-03-24T17:53:13Z")

</div>

> [@tshenry](#):
>
> I’m working on something similar that applies to any topic with a specific tag. I haven’t found a way to do it with the api at this point, but there is a CSS class for each tag that you can use to make sure you are in a topic with that particular tag:
> 
> $(‘.tag-tagname’).length

FYI this doesn’t work correctly because sometimes the ’ Suggested Topics’ element that is displayed after the post+replies contains a tag that isn’t actually on the topic you’re looking at. That means it’ll incorrectly find the tag from the suggested topic instead of the one from the topic you’re actually looking at.

---

_[View the full topic](https://meta.discourse.org/t/getting-tags-from-post-in-plugin-addposttransformcallback-function/83678)._
