[wp-hackers] $wpdb query

Robin Adrianse shorty114 at shorty114.net
Wed Sep 20 02:42:38 GMT 2006

Like you said, I'm not sure if this is the best place for a request like
this, but here's my answer:

Categories: A category is made a subcategory by setting category_parent to
something other than 0, namely the ID of the category which is its parent.
If it is 0, then it will just be handled as a root category (no parents). If
you can't figure out the SQL for this, feel free to ask.

Pages: First off, a page is differentiated from a post by the setting of
post_status. Pages always have it set to "static" (without quotes, of
course), and posts can have it published, draft and private. That said, a
page is made a sub-page similarly to a category. There is a field
post_parent which is the ID of the page's parent. If it is 0, it is a
root-level page.

I hope this answered your questions.

On 9/19/06, ryan fitzer <ryanfitzer at gmail.com> wrote:
> Tried the forums but I'm not sure if that's the place for it.
> Anyone know the query to add a sub-category and a sub-page in install.php?
> I
> want to be able to use it to do auto set-ups for custom themes. Any help
> would be great.
> I'm also trying this for WordPress MU for a different project.
> I've successfully added an extra category, post and page. I'm so close!
> Thanks for any help.
> --
> Ryan Fitzer
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list