[wp-hackers] Custom Post Type

Dan Larkin nitephire at gmail.com
Sun Jan 27 07:35:54 GMT 2008

Hello, I'm a bit new to WP development, so if my questions make me seem like
a total newbie, it's because I am.  I apologize in advance for if I ask
anything stupid.  I haven't been able to find good documentation on what I'd
like to do, so I figure this is the best place to go.

I'm looking to write a plug-in which uses the in-place posts table; however,
I'd like to use the 'post_type' column to insert a type other than 'post' or
'page,' such as 'album' or 'group.'  This is desired because it would keep
these posts out of the Page and Post sections under the admin Manage
screen.  Ideally though, I'd like them to be treated as regular pages so as
to take advantage of the existing template system.  The problem I've run
into is that the &get_post and &get_page functions seem to pretty much
ignore any records that have a 'post_type' entry that isn't 'post' or
'page.'  I'm wondering if there is a hook or other sort of mechanism that I
can use to make WP handle other values of 'post_type.'

Also, on a bit of a side-note, how much of a taboo is it to alter existing
WP table structures?  For instance, to add a column to the comments table?
Will it break upgrades and the such?

Thanks in advance for the help.

:: Dan

More information about the wp-hackers mailing list