Skip Navigation

[Resolved] Structuring with Toolset: Custom Post Type vs Taxonomy

This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 5 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1187628

Tell us what you are trying to do?
--------------------------------------------------
I am trying to create a travel website for a client. It's a membership website with country guides and city guides (that can be submitted by users). Every city guide has restaurant guides, every country guide is actually just basic information about the country and a list of city guides. I want members to be able to submit city guides and restaurant reviews and I want guests to be able to vote on those guides or restaurant reviews. And I want members to add comments to other members' reviews.

Is there any documentation that you are following?
--------------------------------------------------
Yes, I am reading about SEO, Toolset tutorials and general data architecture strategies. I want to set this up the proper way immediately.

Is there a similar example that we can see?
--------------------------------------------------
Not really, maybe nomadlist.com - but my client wants to make it a community content site

What is the link to your site?
--------------------------------------------------
Not started yet, but I want to start with the best approach rather than restructuring down the line.

----------------------------------------------------------
----------------------------------------------------------
----------------------------------------------------------

MY INITIAL THOUGHTS (after reading the toolset tutorials and online)

I am confused however how the data should be structured. The regular blog posts have a category, so this would be the "topic" for the regular blog posts I guess. We would limit this to 5 topics and put every blog post in one category and use the category archives for users to find older blog posts.

But for the "City guides" I want to create a custom post type.

This is where the confusion comes in. What is the best way to structure this?

My initial idea was the following:

- Create a Custom Post Type for "City Guide"

- Create Custom Taxonomy for "Location" (that is hierarchical): i.e. Europe > Spain > Madrid (Continent, Countries, Cities) - and assign this taxonomy both to the regular blog posts and to the CPT "City Guide"

- Each City Guide consists of a set of "Restaurant Review", so I would create another CPT for "Restaurant Review" (they would also use the location taxonomy - but only the bottom of the hierarchy i.e. the city - because a restaurant review is part of a city guide, not a country guide)

- Create a one-to-many relationship between: "City Guide" and "Restaurant Review" - which both uses the "Location" taxonomy

Questions:

1- Is this the proper way to structure Toolset to achieve my goals?

2- Can regular comment be used to make this a community site? I want guest to be able to contribute their thoughts about the city guides.

3- Do I need to create a Custom Post Type for the Continents / Countries and Cities? Or is this best a taxonomy?

4- Do I need to use "subscriber" for people registering to the site in order to be able to post content? Or should they become authors right away?

5- In the reference site about travel I see not even a taxonomy was used for the countries / cities, but this was just an address field. Is this a better way? What are the downsides and upsides? I want users to be able to filter on all guides per country, per city etc.

6- In general, it's not clear to me when to use a dropdown field, or any data field for a custom post type, versus using a taxonomy.

7-The members should show on their profile which country they are from: is this an address field? A free text field? A taxonomy? A dropdown field? I don't know. The client wants to offer functionality to find all members from a particular city.

==========

Thanks for shedding some light of this, it would really give me confidence I'm applying your software the correct way and get started on the right foot.

#1187996

Hello,

There are lots of questions in this thread, I am trying to answer them one by one.

Q1) Is this the proper way to structure Toolset to achieve my goals?
There isn't such exact built-in feature within Toolset, for example "vote on those guides", I assume you are going to add a rating systems to your website, and you need calculate the average rating value for each guides post, here might need custom codes or other rating plugin.

Q2) Can regular comment be used to make this a community site? I want guest to be able to contribute their thoughts about the city guides.
Yes, custom post type supports wordpress built-in comment feature, you can enable it by editing your custom post type, in section "Sections to display when editing ", enable option "Comments".

But Toolset form plugin does not support comment.

Q3) Do I need to create a Custom Post Type for the Continents / Countries and Cities? Or is this best a taxonomy?
It depends on you, if you need a ancestors drop down in search form, just like our demo site:
hidden link
see section "Search Houses", "State"-> "City", then you need to create custom post type for the Continents / Countries and Cities, see our document:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/how-to-filter-posts-by-their-ancestors/

Q4) Do I need to use "subscriber" for people registering to the site in order to be able to post content? Or should they become authors right away?
You can use "subscriber" user role to submit the post form to create new post content, it doesn'tneed "author"user role
https://toolset.com/documentation/user-guides/access-control-for-cred-forms/

Q5) but this was just an address field. Is this a better way? What are the downsides and upsides?
You can consider ancestors filters, see my answer in Q3)

Q6) In general, it's not clear to me when to use a dropdown field, or any data field for a custom post type, versus using a taxonomy.
The custom search form ancestors filter feature does not support hierarchical taxonomies, it supports post type relationships.
So in your case, I suggest you try with post types.

Q7) The members should show on their profile which country they are from: is this an address field? A free text field? A taxonomy?
It depends on yourself, if you are going to setup "country" as a custom user field, then you can consider custom select user field, see our document:
https://toolset.com/documentation/user-guides/user-fields/

Since wordpress user isn't a post type, so it is not possible to register a custom taxonomy to wordpress user.

For your reference.