Add MC Tag Based On Post Category

[ad_1]

Plugin Contributor
Lap

(@lapzor)

I think that this code runs outside of the post loop so it doesn’t know what post we’re at and what it’s category is.

The mc4wp_integration_wp-comment-form_subscriber_data filter has $related_object_id as second parameter after the $subscriber.

I believe that would be the post ID in this case, that you can use to look up the post and get it’s category.

Kind regards,

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer