I've refrained from asking this question for a couple weeks, as I wasn't completely certain what I wanted cleared up... think I got it.
I'm in the process of putting together a plugin to run a somewhat complex portfolio feature for my new personal site. The need was for a reasonable number of custom fields for each portfolio item, a number of categories (illustration, web design etc) and a way to build relationships. I use those categories to populate a list which delivers data via user submitted ajax requests.
I weighed several options for this and landed on what I knew - and specifically didn't use custom post types; really, the only reason was ignorance. I did read a number of articles on the subject, but it just wasn't clear to me how to accomplish my goals.
At any rate - I've spent the last couple weekends building a plugin that creates three new tables, deals with CRUD from the admin pages, and controls ajax requests. And it works great, in fact, for the "multi" template (which just gathers categories of thumbnails).
Then I started working on the "single" page (which would just be a template for the display of a single line item), and it dawned on me that to incorporate searching, comments, permalinks etc, I was going to have to do a lot of hacking to tie my custom data into the main wp system.
At any rate. I've since come understand that I can, in fact, use custom post types to hold the portfolio line items, and a custom taxonomy to develop the set of terms I will need for categorization. I'm hoping someone can fill me in on some of the details that are still sticking (because the documentation on this subject is very thin, at best...).
The code to create a custom post type seems pretty straightforward, as is the code for a custom taxonomy, but I am still unclear on a couple points:
How do I manage them? I have about 20 columns that I'm populating - I've read a few things stating they are created via meta boxes? What table is that data actually stored in? wp-posts?
I understand how to create a custom taxonomy, but how do I go about linking my custom post type with that taxonomy? How do I filter a query for this taxonomy to populate the front-facing ajax drop-down selector?
Are there plugins that can make this easier? I'm planning on coding everything at this point.
Finally, given the scope of my project, are custom post types appropriate for what I'm trying to do? Does it make sense to scrap what I've already put together? Honestly - this is my first attempt at a plugin, and I've learned quite a lot - but the addition of wp features like searching, comments, permalinks etc. all seem pretty attractive.
I submit to the experts -
How do I filter a query for this taxonomy to populate the front-facing ajax drop-down selector?
Let me explain this more clearly. When the front-facing portfolio page is visited by a user, I run a query on all the available terms (currently this term data is from my non-wp, custom tables), and use those to populate either a drop-down selector, or just an unordered list. I hook into those elements to pass (in this case) ID values (categories like 'illustration' or 'web design') to an ajax sequence, which returns a json object containing sql results. I then build out thumbnails and other content for these items dynamically.
The question then, is how do I structure a query to return custom post types based on terms from a custom taxonomy? As long as I can return a json object from that query, I can just use my current ajax / js sequence as it stands.
Thanks for the help -