Skip Navigation

[Resolved] Taxonomy Select Field

This support ticket is created 5 years 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 10 replies, has 2 voices.

Last updated by richardB-17 5 years ago.

Assisted by: Luo Yang.

Author
Posts
#1489459

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.

#1489677
dropdown.JPG

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.

#1490069
post-type.jpg

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.

#1491347

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

#1491799

Okay, thank you so much this information was very helpful.

#1492977

Please let me know if you need more assistance for it, feel free to create new ticket if there is other question. Thanks

#1499287

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

#1501031

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.

#1503101

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.

#1503359

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.

#1503391

My issue is resolved now. Thank you!