0

I'm helping someone who has a WordPress website that's completely set up with all kinds of plugins. Some not doing exactly standard stuff or going through the proper hooks/filters.

One of these plugins builds mail content based on either the excerpt or content fields of the post object ($post->post_content or $post->post_excerpt). The problem is I'm using a custom post type that doesn't have the needed info in those fields.

Looking at the logic of the plugin the easiest field to use for my custom content is $post->post_content. But at the moment I'm stumped where I need to add this logic. As the action the_post doesn't do anything. Nor does the filter the_content. (my code works as in the loop the changes are applied)

Does anyone have any suggestions on how I can change the contents of $post->the_content? If you're wondering which plugin I'm currently fighting with it's Mailpoet 3.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.