[wp-hackers] Extending Custom Post Types

Kevin Newman CaptainN at unFocus.com
Mon Jul 12 23:02:58 UTC 2010


  Hi there,

I'm looking for some pointers on extending the dataset that goes along 
with a custom post type. I'd like to be able to store data like a list 
of amenities for a business listing, map coordinates, granular address 
information, etc., and then query and sort on that data, in non-static 
query pages (sort on the "zip" column, or return only "business" post 
types with swimming pool amenities, for example).

Is there a way to do that using the built in Custom Post types alone 
(some of this could be done with tag like taxonomy, but other bits, like 
location or address data might not be suitable), or should I add a 
custom MySQL table to retrieve, sort and group query results on extended 
data? If I use a custom table, anyone have an example to get me in quicker?

Pointers on adding the actual form fields to the edit/new custom post 
type pages in the admin would be helpful too (I'm pretty much starting 
from start here).

Thanks,

Kevin N.



More information about the wp-hackers mailing list