# Dynamically pass Wordpress tag to mailchimp

**URL:** <https://community.gravityforms.com/t/dynamically-pass-wordpress-tag-to-mailchimp/11040>\
**Category:** Get Help\
**Tags:** tags, gform\_replace\_merge\_tags, mailchimp, conditional-logic\
**Created:** [October 27, 2021, 6:54pm UTC](https://community.gravityforms.com/t/dynamically-pass-wordpress-tag-to-mailchimp/11040 "2021-10-27T18:54:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tperfitt](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/tperfitt/32/3883_2.png) [@tperfitt](https://community.gravityforms.com/u/tperfitt)\
**Post date:** [October 27, 2021, 6:54pm UTC](https://community.gravityforms.com/t/dynamically-pass-wordpress-tag-to-mailchimp/11040/1 "2021-10-27T18:54:12Z")

</div>

I have a Gravity form at the bottom of all my blog posts and I wanted to target the audience with mailchimp by passing the Wordpress tag of the page the blog post is on to the data that gets posted. I am able to select any of the data fields in the mail chimp add on to target the audience in mail chimp and that works fine. However, I cannot figure out how to get the Wordpress tag on the blog page into a form element so i can use it. It seems like it should be merge tag like post\_tags. Anyone have an idea on how to include the tags on the page the form is on the same way you can include the page name or url?

---

<div class="post-metadata">

**Author:** ![sacom](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/sacom/32/53_2.png) [@sacom](https://community.gravityforms.com/u/sacom)\
**Post date:** [October 27, 2021, 7:38pm UTC](https://community.gravityforms.com/t/dynamically-pass-wordpress-tag-to-mailchimp/11040/2 "2021-10-27T19:38:28Z")

</div>

There are no Gravity Forms merge tags for to get WordPress tags. But you can create your own custom merge tag using the following filter: [gform\_replace\_merge\_tags - Gravity Forms Documentation](https://docs.gravityforms.com/gform_replace_merge_tags/)

You will need to setup some custom code to get the tags for the posts and use the above filter to return the result. This WordPress function can be of help: [get\_the\_tags() | Function | WordPress Developer Resources](https://developer.wordpress.org/reference/functions/get_the_tags/)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [November 26, 2021, 7:38pm UTC](https://community.gravityforms.com/t/dynamically-pass-wordpress-tag-to-mailchimp/11040/3 "2021-11-26T19:38:59Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
