[wp-hackers] Extending Custom Post Types

Mike Schinkel mikeschinkel at newclarity.net
Mon Jul 12 23:06:35 UTC 2010


Custom fields vs. custom tables whenever possible.  Give us some more specifics of what you are trying to do but are struggling with when using custom post types and we'll do our best to help out.

-Mike

On Jul 12, 2010, at 7:02 PM, Kevin Newman wrote:

> 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.
> 
> _______________________________________________
> 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