On 20/04/06, Paul Menard <[hidden email]> wrote:
> So dumb question I'm sure. I need to grab the post_content variable
> to include in an HTML email. Normally I call $post->the_content()
> which will echo the formatted content to the screen.
Actually, you never call $post->the_content(), the_content() is a
global function (not a method) which echoes $post->post_content.
If the post you want to email is one of the ones selected (i.e., it's
in $posts), then use apply_filters('the_content', $posts[n]); If it's
> David House said it all when he uttered:
>> $content = apply_filters('the_content', $post_to_email-
> Yep. Look at functions-formatting.php's function wp_trim_excerpt
> for an
> example of how to include a cleaned version of the post in your
> wp-hackers mailing list
> [hidden email] > http://lists.automattic.com/mailman/listinfo/wp-hackers >