Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm currently in the process of redeveloping my website. I've decided to use WordPress as its CMS, rather than coding everything from scratch.

It's a fishkeeping website, consisting of species profiles; plant profiles; fossil species profiles; articles; news posts and blog posts.

My original idea was to create plugins for each of those (excluding articles/news posts/blog posts as I can just add post categories), with each plugin creating a new database table and adding the relevant admin menus (create, view/amend).

I've stumbled across custom post types today, and I'm now wondering if they'll do the job for me? It would be ideal if they could - save me a lot of time and offer some reasonably useful functionality that I probably won't bother to code if I do it the other way (time constraints).

The species profile is the most complex aspect of the site. It will have ~20 fields.

A few of the fields will need to be lookup fields, i.e. category which will allow the user to select from a list.

A few of the fields will need to be array values, i.e. one textbox called "ph_min" and one called "ph_max" which are stored in the DB as a serialized array.

Fields following these array fields will require a custom TinyMCE button to insert BBCode such as [ph_min] (this will allow us to write: "keep these fish at [temp_min] if possible, but don't use water above [temp_max]" whilst having a conversion button at the top of each profile).

Are Custom Post Types flexible enough to do all of the above for me, or should I just take it back to basics and write my own admin pages and database tables?

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

Custom post types are an excellent way for this kind of a job. I'd suggest reading the following info:

Custom Post Types (1) (2)

Taxonomies (1) (2)

Custom Meta Boxes (1) - I use this class all the time, or (2)

If you are new to Custom post types, an easy way to start would be playing around with Custom Post Types UI plugin and work your way up.

share|improve this answer
add comment

Like Daniel says, CPT's with taxonomies are definatly the way to go for something like this:

1 custom post type for fish
with different fish species as taxonomies registered to it.

1 custom post type for fossils
again register some fossil types as taxonomies

1 custom post type for plants
with plant species as taxonomies

Then you can be really clever and give those CPT's shared taxonomies of something like region, river, ocean.

and finally top it all off with scribus killer query by multiple taxonomies plugin for filtering through the returns in search.

share|improve this answer
    
That sounds ideal, but will it stifle the flexibilty I require? For example, is it possible to have more than one TinyMCE textarea on one of these Custom Post Type pages? Excuse my ignorance, I've been working solid since I posted and haven't had a chance to check Daniel's links. –  dunc Jun 21 '11 at 13:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.