[wp-hackers] How To Append Content To A Post?

Andrew Nacin wp at andrewnacin.com
Tue Sep 7 16:32:12 UTC 2010

On Tue, Sep 7, 2010 at 11:13 AM, Adriaan Pelzer <adriaan at wewillraakyou.com>
> The way I do it is to work with $post->post_content

Not a good idea. Much better to use the existing filter for this. Otherwise
you may be clashing with plugins and core. It's a hack.

On September 7, 2010 at 4:11 PM Raj <list at expost.org> wrote:
> Is there anyway of passing the id of the post also?

On Tue, Sep 7, 2010 at 12:14 PM, Eric Mann <eric at eamann.com> wrote:
> Not with this filter.

Not true. While they aren't passed to the filter as an argument, you can
still access this information. Because the_content() is used in the
loop, then you can simply use the $post and $id globals in your callback.

More information about the wp-hackers mailing list