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?
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
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
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.