[wp-hackers] Direction for custom taxonomy/post types

Nathaniel Taintor goldenapplesdesign at gmail.com
Mon Oct 18 20:25:13 UTC 2010


I think there's a confusion of terms here. It sounds like the question you
have is whether to use custom post types with custom taxonomies, or add new
tables to the database. Using custom post types for albums and songs,
connected via a shared taxonomy - or better - using scribu's plugin, allows
you to use a lot more of WordPress built-in API functions than you would be
able to if you reinvented the wheel by creating your own tables and
developing all of the query functions to access them. So that seems like the
best way to structure your site.

Whether you create these post types through a plugin or through your theme's
functions is entirely a matter of personal preference, and I don't see any
reason why one would be preferable to the other. Plugins are typically used
for functions that may need to be enabled or disabled, or need to be easily
installed on another site, so the easiest way to build what you're looking
for is to add the functions you want to your theme's functions.php file, or
to build a child theme with these functions in its functions.php file if
you're working off of a pre-made theme.


Nathaniel Taintor, Designer/Developer
*Golden Apples Design*
http://goldenapplesdesign.com

@GoldenApples | 503.877.2880
goldenapplesdesign at gmail.com



On Mon, Oct 18, 2010 at 1:15 PM, scribu <mail at scribu.net> wrote:

> On Mon, Oct 18, 2010 at 10:16 PM, Joshua Sibelman <
> joshua.sibelman at gmail.com
> > wrote:
>
> > The reason I was thinking a custom plugin was because that seems to be a
> > good way to hook into WP actions, while offering the ability to define
> > custom Admin panels for my client to be able to manage all this content.
> > Where the idea of the plugin deters me is that I'd love to be able to use
> > things that come pre-built with the existing WP post functionality like
> > images, date sorting, etc.
> >
>
> With a custom post type, you can replace none, some or all of the elements
> that come with the default post editing admin panel, so creating your own
> data type just for this sounds like reinventing the wheel.See the
> 'supports'
> and 'register_meta_box_cb' arguments for register_post_type():
> http://codex.wordpress.org/Function_Reference/register_post_type
>
> Also, note that you can use hooks just as well directly from the theme.
>
> The tricky part would be connecting songs to albums. I have a plugin for
> that; it's called Posts 2 Posts <
> http://scribu.net/wordpress/posts-to-posts>
> .
> _______________________________________________
> 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