[wp-hackers] wp-hackers Digest, Vol 66, Issue 107

Mike Schinkel mikeschinkel at newclarity.net
Wed Jul 28 00:13:14 UTC 2010


On Jul 27, 2010, at 7:58 PM, Jeff Rose wrote:
> To the other poster who asked why I don't create a custom post type, it's
> because I've got 20,000+ item that aren't considered post-type data in
> anyway.
> 
> If I'm understanding custom post types correctly, it seems a bad way to go
> just to store 5 tiny bits of data about 20,000 items.

I think you misunderstand the value of custom post types.  For your use case you'd automatically get the taxonomy system as well as post meta to allow tagging every song with any custom field data you like. You'll also get to serve the song info via a URL like http://example.com/songs/{song-slug}/ where Google will index all 20,000.  You'll also get onsite searching that works with custom post types for "free" too.

Also there are strong indications the WordPress team plans to get rid of the wp_links table in exchange for a 'links' custom post type (as per Nacin recently, and others in the past.)  While not all sites will have 20,000 links, a song might have more related info than a link, so I would ask why they would use post types for links if you wouldn't use post types for songs.

>  Imagine just wanting to let people search your song list in a
> widget, vs reading tons of details about it.

I'm not sure why having a song implemented via a custom post type needs to carry tons of detail about the song in a widget?  You don't have to display everything that's in the database; only display what you need, not everything.  

Anyway, do it how you like but "songs" seem to me to be a perfect fit for a custom post type.

-Mike




More information about the wp-hackers mailing list