I have created a post type called machine and now I would like to add a select field that uses a category called machine condition.
Hello,
I assume we are talking about creating/editing post with Toolset Forms plugin.
If it is, you can edit the post form, and setup the taxonomy field using option " Display taxonomy as a select dropdown", see screenshot: dropdown.JPG
More help:
https://toolset.com/documentation/user-guides/front-end-forms/cred-shortcodes/#cred_field
single_select Optional. Used by fields for Hierarchical Taxonomies (like Categories) to signify that the select field does not support multi-select mode.
Hi Luo, I hope you are well. It is a post type, not a form. The user will use the post type to load a machine. I need to create some select fields and single text fields that can be used as filters on the font-end when people are searching for a machine based on information used from the select fields when the machine was loaded.
My end goal is to have these machines listed on the front end on a page where they can be filtered. I am not sure if the taxonomy is the correct method here but basically I will have a number of select fields and single text fields in the post type that will need to be available on the front end as a way of filtering content. I have added an image for you to view if it helps.
Toolset Views plugin supports filter posts by custom fields and taxonomies, see our documents:
https://toolset.com/documentation/user-guides/views/filtering-views-by-taxonomy/
https://toolset.com/documentation/user-guides/views/filtering-views-by-custom-fields/
https://toolset.com/documentation/user-guides/views/front-page-filters/
But if you need to order the result by specific condition, I suggest you try with custom fields, since Views is using WordPress class WP_Query to query posts, WP_Query does not support order result by taxonomy, see WordPress document:
https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
Okay, thank you so much this information was very helpful.
Please let me know if you need more assistance for it, feel free to create new ticket if there is other question. Thanks
Hi Luo, I hope you are well. So I have been playing around with views but I can not seem to get my select fields to show by using the wp views filter.
I imagine that I am doing something wrong during the configuration of the view. When I add a new view which option should I be choosing to filter the results on the page as the user filters using the select fields in the wp views filter?
1.Display all results
2.Display the results with pagination
3.Display the results using a custom search
4.Full custom display mode
I suggest you try with option "Display the results using a custom search", see the document I mentioned above:
https://toolset.com/documentation/user-guides/views/front-page-filters/#custom-search-view
section "1.1.A. Setting up a Custom Search View"
if you need more assistance for it, please provide a test site with the problem, fill below private message box with website login details, also point out the problem page URL and view URL, I can setup a demo for you.
Thanks for the details, I can log into your website.
Are you going to display the search form in left sidebar?
If it is, you can follow the document I mentioned above to display the search form:
https://toolset.com/documentation/user-guides/views/front-page-filters/#4-1-adding-the-custom-search-form-to-a-page-or-widget
section "4.1. Adding the custom search form to a page or widget".
In this case, you can put this shortcode into your sidebar:
[wpv-form-view name="search-machines" target_id="48"]
More help:
https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-form-view
You can use wpv-form-view shortcode when you want to display only the Search form for a View.
Hi, Lou, it looks like I have an issue with my theme but I have managed to pull the filter through. Thank you so much for your help.
My issue is resolved now. Thank you!