Skip Navigation

[Resolved] Are Toolset custom fields available for wp queries?

This support ticket is created 4 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 1 reply, has 2 voices.

Last updated by Luo Yang 4 years ago.

Assisted by: Luo Yang.

Author
Posts
#1564597

I'm trying to create an advanced search interface that is based on the custom fields of my custom post type (similar to the interface of an airlines ticket website)
I've started with this tutorial hidden link
I'm wondering if registering the custom query vars is necessary or if the Toolset custom fields can already be used in a WP_Query without that step.
Additionally—can i use my custom fields slug directly on the URL to test?
?wpcf-slug1=wpcf-value1&wpcf-slug2=wpcf-value2
that doesn't seem to work.

#1565047

Hello,

I have checked the URL you mentioned above, it seems to be a artical talking about customize the WordPress built-in search result page.

In Toolset side, all custom post fields are standard WordPress custom post fields, and it is possible to setup the query as you mentioned above without custom codes.

For example, you can try these:
1) Dashboard-> Toolset-> WordPress Archive, create a new one, and enable option "Search results".

2) In section "Query Filter" of above WordPress Archive, follow our document to setup the filters on custom fields using URL parameters:
https://toolset.com/documentation/user-guides/views/filtering-views-by-custom-fields/#source-for-compare-value
URL parameter
The value for the filter is set in the URL to the page
This will let you create custom searches filters for Views, where visitors can control what the View will show.

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