[wp-hackers] Unexpected behaviour in WP_Query

Austin Matzko if.website at gmail.com
Wed Feb 4 18:53:23 GMT 2009

On Wed, Feb 4, 2009 at 12:35 PM, Matt Walters <mwalters8 at gmail.com> wrote:
> I asked about it in #wordpress-dev about a month ago and was told
> $post->post_category was fine to use for updating a posts categories,
> but it does not retrieve the categories when the object is loaded.
> So, not sure it really helps with the issue at hand, but just wanted
> to point out it's not a complete fossil yet either.

That's right, more or less.  "post_category" is an array parameter
that you can pass to wp_insert_post(), for example, to set the post's
categories.  However, what the OP is seeing is the vestige wp_posts
table field, which is unused.  They share the name "post_category" but
they are two separate things.

More information about the wp-hackers mailing list