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.

My current WordPress site only exists of pages. The structure is as simple as this:

example.com/hotels 
example.com/attractions 
example.com/restaurants 

I want to use Custom Post Types to add listings about individual hotels, attractions and restaurants. The new structure will look like this:

example.com/hotels/myhotel 
example.com/attractions/myattraction 
example.com/restaurants/myrestaurant

With myhotel/myattraction/myrestaurant being a Custom Post Type.

All listings share the exact same custom fields.

My Question: Do I need to create 3 Custom Post Types (hotel/attraction/restaurant) or should I register just 1 "global" custom post type - eg called "Place" - and specify if its a hotel/attraction/restaurant using hierarchical Custom Taxonomies?

What are the advantages/disadvantages of these different approaches?

Thanks!

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Personally I would structure it like a CPT for each Hotels, Attractions, Restaurants. Then a custom taxonomy that ties them together for instance "Places" with children like "Locations", etc.

If the site has a lot of connected data it is a really good idea to sketch out the relationships on paper or using software like Visio so you can visually see how it all fits.

share|improve this answer
    
Why would you prefer create a CPT for each item? Maybe for flexibility in the long run? Or is there another reason? Viseo is a good idea, I´ve been using Excel but it´s not very visual. –  Mattvic Oct 12 '11 at 18:30
1  
The reason I would thing the top levels items as CPT's is it's very likely the display data is very different , for instance a Restaurant page would not have the same stuff as a Hotel page. –  Wyck Oct 13 '11 at 1:40
    
That makes sense :) Thanks –  Mattvic Oct 13 '11 at 5:11
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.