Home › Toolset Professional Support › [Resolved] Child CPTs vs Taxonomies
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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
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)
Tagged: Setting up custom types, Types plugin
Related documentation:
This topic contains 14 replies, has 2 voices.
Last updated by Luo Yang 6 years, 4 months ago.
Assisted by: Luo Yang.
Tell us what you are trying to do?
Hi:
I have a lot of data that a user needs to choose from when they sign up and set up their page.
I'm trying to decide whether it's better to use Child CPTs attached to the Main (User) CPT, or to use *many* Taxonomies for the Main CPT with *no* Child CPTs.
My Questions:
1) Can a User (Main CPT) choose from multiple Child CPTs on Registration? (I noticed in the Real Estate Reference Site it only allows one choice of Child CPT). If so, I'd like for the User (Main CPT) to choose the multiple Child CPTs during Registration, then, after Registration, for the User (Main CPT) to be directed to another page to fill out the Taxonomies for each Child CPT they selected. Is this possible with Toolset?
OR
2) Can a User (Main CPT) choose multiple checkboxes of a Main Category/Taxonomy on Registration, then, after Registration, be directed to another page to fill out Child Taxonomies (possibly pulled up/called by a "Taxonomy Term metafield" that would relate to each Term of the Main Category Taxonomy). Is this possible in Toolset?
The reason I'm trying to determine which way to go is that I understand that Post Relationship searches take longer, performance-speed-wise, to pull up (since they are more complex), while Taxonomy searches are a lot quicker. So, if it's possible to do #2 above (Taxonomy scenario), then I'd probably go with that. But I also need to know if it's possible to do #1 above (multiple Child CPts selection) as an alternative to not doing #2, if #2 is not possible.
Thank you for your kind help.
Is there any documentation that you are following?
Is there a similar example that we can see?
What is the link to your site?
Hello,
How do you setup the Registration form?
Is it a Toolset form for creating wordpress user or custom posts "User"?
I assume the "Registration form" is a Toolset post form for creating "User" posts.
Q1) If you are going to setup one-to-many relationship between post types "User" and "Child-CPTs", in the "Registration form", you won't be able to related the new "User" post with existed "Child-CPTs" posts, you can create it without relationship settings, then setup other relationship form to related the existed "User" posts with "Child-CPTs", see our document:
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/
Then setup a form for editing "Child-CPTs" posts, use it to manage the terms of each "Child-CPTs" post
Q2) There isn't Toolset form for editing/creating custom Taxonomy, so I don't think it is possible within Toolset.
Hi:
Re: Option #2 with using a Main Taxonomy and creating "child" Taxonomies... I understand it's possible to add metadata to a Taxonomy's Terms, so I was thinking to create a metadata for a Taxonomy such as "CatID=...", then related that to the CatID of the Main Taxonomy, then show conditionally, i.e. "if ID, then show those IDs". Is that possible in Toolset?
I understand it's possible to add metadata to a Taxonomy's Terms
Yes, it is possible to add custom term field to Taxonomies, see our document:
https://toolset.com/documentation/user-guides/#types-topics
For the new question, then related that to the CatID of the Main Taxonomy, then show conditionally, i.e. "if ID, then show those IDs". Is that possible in Toolset?
There is built-in "hierarchical" taxonomy, why do you still need such kind of custom term field?
https://toolset.com/documentation/user-guides/create-custom-taxonomies/#taxonomy-types
And as I mentioned above, There isn't Toolset form for editing/creating custom Taxonomy, so even you have the custom term field, you still can not create/edit it with Toolset form, you can only manage it in WordPress admin side with Types plugin.
I thought it would be possible to attach a form value to a taxonomy, but now I'm beginning to believe (from your above responses) that a user cannot use a taxonomy to submit data about their page? (I'm sorry, I'm new to WordPress.)
What I'm trying to do: I would like to have the user multi-select, (from a list on a form), the categories that they belong to. Then, I thought I could show the user the taxonomies that are related to each category they choose, so they can then further select Terms, and define the subject of their page. This is not possible?
If not, are you saying the only way for a user to define the subject of their page is to use forms to submit content? Are the taxonomies only for visitors to search?
I thought I would try to save duplication by having the user, (who's describing the contents of their page), and the visitor, (who's searching for page contents), use the same taxonomy. This is not possible?
Does this mean that I need to create forms for user submission, then also create parallel taxonomies for visitors to search (basically duplicating all the forms values)?
I thought it would be possible to attach a form value to a taxonomy, but now I'm beginning to believe (from your above responses) that a user cannot use a taxonomy to submit data about their page? (I'm sorry, I'm new to WordPress.)
If not, are you saying the only way for a user to define the subject of their page is to use forms to submit content? Are the taxonomies only for visitors to search?
I thought I would try to save duplication by having the user, (who's describing the contents of their page), and the visitor, (who's searching for page contents), use the same taxonomy. This is not possible?
Does this mean that I need to create forms for user submission, then also create parallel taxonomies for visitors to search (basically duplicating all the forms values)?
You can associate custom Taxonomies with wordpress custom post types, but you can not associate custom Taxonomies with wordpress users, it is not possible to display Taxonomies in a Toolset form for creating WordPress user (Registration form).
So WordPress user cannot use a taxonomy to submit data in their profile page.
But you can register Taxonomies to custom post type:
https://toolset.com/documentation/user-guides/create-custom-taxonomies/
and setup Toolset form for creating posts of custom post type:
https://toolset.com/documentation/user-guides/creating-cred-forms/
In the post form, your user can add more terms and select existed terms of taxonomy, and create/edit the posts of custom post type, just like editing/creating a wordpress post in the dashboard side.
For the visitor, you can setup a post view, query the posts of custom post type, with a custom search form, filter by the Taxonomies:
https://toolset.com/documentation/user-guides/front-page-filters/
Thank you for the clarification. What I guess is confusing is that I saw a Taxonomy in the CRED Training example, but now I see it was in a Content Form.
So, although I can't use taxonomy in a User Registration Form, could I create a Required multiselect field in the User Form, and then (after Registration) do a conditional in the *Content Submission* Form that 'if "x" value in the *User* Form multiselect field is selected, then show these certain selected Taxonomies (for User to fill out), andif "y" value in the User Registration Form's multi-select field then select other Taxonomies' etc, ...and do this for each value in the User Registration Form's multi-select field?
That will conduct other unexpected result, I suggest you try the workaround of our document:
How to Create Custom Searches and Relationships for Users:
https://toolset.com/documentation/user-guides/how-to-create-custom-searches-and-relationships-for-users/
Thank you for that very helpful link (it is useful to me).
It is now clear to me that I can't enter this "Main Taxonomy" in the User Form. So, after Registration:
--can I redirect the User to a (Post?/Content?) Form that shows a "Main Taxonomy" and requires the User to then multi-select values from that "Main Taxonomy" which, once User submits their selected (Main Taxonomy) Values, will then call 'if this (Main Category) value, then show this other Form'? (The form will be pre-created with the Taxonomies that I want them to fill out for that particular Main Category value).
-- And then loop thru the Main Category values to show each pre-created Form that relates to the particular user-selected Main Category value?
For your new questions:
Q1) can I redirect the User to a (Post?/Content?)
Yes, you can redirect user to a specific page, this is built-in feature of Toolset form: "What to show after submitting the form"
See screenshot redirect.JPG
Q2) will then call 'if this (Main Category) value, then show this other Form'?
Please elaborate the question with more details, if you need display something on the taxonomy value, you can use wpv-conditional to check the taxonomy value, then display what you want:
https://toolset.com/documentation/views-shortcodes/#wpv-conditional
Q3) And then loop thru the Main Category values to show each pre-created Form that relates to the particular user-selected Main Category value?
Please elaborate the question with more details, what is the Main Category values? how do you setup it? what is the pre-created Form? how do you setup it and relate to the particular user-selected Main Category value?
Hi:
To give you an example of what I'm trying to do:
Say I have a CAR TYPE (Main Category) Taxonomy containing values such as Honda, Toyota, Chevrolet, Ford, etc. After User Registers, the new User is redirected to a page containing a Form of the CAR TYPE Taxonomy where the user can multi-select from the different CAR TYPE values (eg Honda, Toyota, Chevrolet, etc) .
Each CAR TYPE value will have one or more Taxonomies (eg there could be two Taxonomies specific to Honda, or three Taxonomies specific to Chevrolet, etc), therefore, I will also have separate individual Taxonomy Forms set up (one could describe as 'detail' forms) that each contain separate more detailed Taxonomies for each CAR TYPE value.
So, after multi-selection of the CAR TYPE (Main Category) values, the User is then redirected to a page (or pages) of the relevant 'detail' forms (Honda Taxonomy 'detail' form/s, Chevrolet Taxonomy 'detail' forms, etc)
This way the User is only shown relevant Taxonomies from which they can choose, rather than all the other many Taxonomies that have no relevance to them.
1) Can you point me to documentation that would show me how to set up the (conditional) call and loop thru, so that when one or more Values are selected from the, eg,, CAR TYPE (Main Category) Taxonomy Form, all the related ('detail') *Taxonomy Forms* are called and shown to the User (arrived at by being redirected after submitted their choices on the CAR TYPE Form page)?
2) Would it be better to put *all* ('detail') Taxonomy Forms of *one* (CAR TYPE) value onto *one* page dedicated for each CAR TYPE Value, OR would it be better to have *one* page dedicated to each individual ('detail') Taxonomy Form?
Thank you for all your continued help and assistance.
Again, there isn't "Taxonomy Form" feature within Toolset form plugin, there are only post/user forms within Toolset form plugin.
So there both 1) and 2) is not possible.
It is not display a taxonomy Form
The workflow within Toolset works like this:
1) Create a custom post type, for example "Car"
2) Create a taxonomy "Car Type", and register it to post type "Car", with terms:
- Honda
- Toyota
- Chevrolet
After user login your website, direct him to a wordpress page, in that page display a Toolset form for creating "Car" post, in the form user can select their favorite "Car Type", after user submit the form, the new "Car" post is created, with taxonomy "Car Type" settings, for example term "Chevrolet"
Then you will be able to setup a view to get the "Car" posts of current user:
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/
In each "Car" post, you can get the taxonomy "Car Type" value:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-taxonomy
And you can use it as a condition in shortcode [wpv-conditional], and display something.
see our document:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/displaying-taxonomies-conditionally/
Hope it is clear
Hi Luo:
I believe there is misunderstanding about what I explained, possibly because I unfortunately described a page containing a form with selected Taxonomies as "Taxonomy Forms."
I see-- in at least two places in the Forms Training Course-- that it **is** possible to put Taxonomies into a Form on a Page:
--Part 1 shows a Taxonomy called "Ad Categories" in a form:
https://toolset.com/documentation/user-guides/cred-training-course/part-1-building-forms-content-submission/
--Part 2 shows how to customize taxonomy terms in a Form:
https://toolset.com/documentation/user-guides/cred-training-course/part-2-customizing-form-content/
Please, let's get past my error in description: I'm wanting to add taxonomies to a Form on a Page.
I hope this clears the miscommunication we are having.
Please respond to my two questions regarding adding taxonomies to a Form on a Page:
1) Can you point me to documentation that would show me how to set up the (conditional) call and loop thru, so that when one or more Values are selected from the, eg,, CAR TYPE (Main Category) Taxonomy Form, the related ('detail') page containing a Form of taxonomies is called and shown to the User?
2) Would it be better to put *all* ('detail') Forms of *one* (CAR TYPE) value onto *one* Page dedicated for each CAR TYPE Value, OR would it be better to have *one* Page dedicated to each individual ('detail') Form?
Thank you.
Q1) This should be the document you want:
Advanced Conditional Display for Form Sections
https://toolset.com/documentation/user-guides/cred-conditional-display-engine/
You can control display for form sections from Forms’s GUI. This will allow to create simple display logic, involving custom fields and taxonomy.
Q2) That depends on your website settings, if there are only few terms in the custom taxonomy, user can find the terms easily, I suggest you display all terms in a field of one form, then display the form in a single page.