Skip Navigation

[Resolved] Not sure when to use CPT or CT

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 8 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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 3 replies, has 2 voices.

Last updated by Luo Yang 8 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#372755

I'm trying to work out what structure I should use, using TYPES

I am making a site that allows someone to find a weekly Quiz night running in Australia.

I have set up a CPT for the quiz events themselves.

But, I need the following data:

1. Day of the week

2. State in Australia it is run

3. The company/provider of the Quiz

I don't know if all the above should be custom taxonomies?

I want to be able to see

- all quzzes

- all quizzes in a state

- all quizzes in a state on a certain day

- all quizzes in a state run by a certain company

- all quzzes in Australia run by a certain company

etc.

I don't want to go through setting it up just to realise I should have done it differently.

It would be cool to use the URL in a cool way

so you go to /provider/quizmeisters and it shows you all quizzes from them
or /provider/quizmesters/sa and it shows you all quizzes from them in sa
or /location/sa and it shows all quizzes in SA
or /location/sa/monday and it shows all quizzes in SA on a Monday

Though I don't know if that's possible.

So, how would YOU set it up?

Cheers!

#373286

Dear david,

Thanks for the details, in your case I suggest you try this:
1) create a custom post type "quizzes"
https://toolset.com/documentation/user-guides/create-a-custom-post-type/

2) create two custom taxonomies(state, company), register them to above post type "quizzes"
https://toolset.com/documentation/user-guides/create-custom-taxonomies/

3) Create a custom date field "quizzes-date" , display it in post type "quizzes"
https://toolset.com/documentation/user-guides/using-custom-fields/

Then you will be able to display the results as what you want by using Views:
a) - all quzzes
https://toolset.com/documentation/user-guides/getting-starting-with-types/
b) - all quizzes in a state
add a taxonomy filter in your view:
https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/
c) - all quizzes in a state on a certain day
add a date filter plus step b)
https://toolset.com/documentation/user-guides/date-filters/
d)- all quizzes in a state run by a certain company
You just need two taxonomy filters in your view, same as step b)
e) - all quzzes in Australia run by a certain company
same as step b)

f) so you go to /provider/quizmeisters and it shows you all quizzes from them
This is wordpress build-in feature
https://toolset.com/documentation/user-guides/create-custom-taxonomies/

g) or /provider/quizmesters/sa and it shows you all quizzes from them in sa
Sorry, it is not possible within Types

h) or /location/sa and it shows all quizzes in SA
This is wordpress build-in feature same as f)

i) or /location/sa/monday and it shows all quizzes in SA on a Monday
It is not possible within Types same as g)

Hope it help

#374134

So if I want to have a page for a quiz PROVIDER...

So if someone clicks on QuizMeisters - it goes to a page that has details about them, a link to their site etc, plus possibly a list of their events, would I still be better to use a custom taxonomy?

Or would it be better to have the providers as a custom post type, then have that as a parent to the quiz CPT

(And then, can I use that provider CPT as a filter on a search?)

#374174

Q1) So if I want to have a page for a quiz PROVIDER...
You can use term archive page for the quiz PROVIDER, there will be

Q2) So if someone clicks on QuizMeisters - it goes to a page that has details about them, a link to their site etc, plus possibly a list of their events, would I still be better to use a custom taxonomy?
Yes, you can setup the custom taxonomy field for each PROVIDER, including site(URL field) etc,
See our document:
https://toolset.com/documentation/user-guides/term-fields/
Adding Term Fields to Taxonomies
and format the term archive page with Views wordpress archive:
https://toolset.com/documentation/user-guides/creating-wordpress-custom-post-archives/
display the Term Fields:
https://toolset.com/documentation/user-guides/displaying-wordpress-term-fields/

It would be easier to setup taxonomy filters in the Views parameter filter form.
https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/
for your reference

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.