Skip Navigation

[Resolved] Can I filter by the same Custom Field twice?

This thread is resolved. Here is a description of the problem and solution.

Problem:
Can I filter by the same Custom Field twice, in a View?
Like filtering by some values in the Query Filter and then by some other values (of the same field) in the Parametric Search.

Solution:
No.
Each Field, Taxonomy or other data can be used only once per View Query (Filter and Parametric Search)

Relevant Documentation:
https://toolset.com/documentation/user-guides/front-page-filters/
https://toolset.com/documentation/user-guides/filtering-views-by-custom-fields/

This support ticket is created 7 years, 11 months 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.

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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 2 replies, has 2 voices.

Last updated by marcusC-4 7 years, 11 months ago.

Assisted by: Beda.

Author
Posts
#400364

I have a real estate site that is listing model homes.

There is a parametric function on this page: hidden link where users can filter the results based on their criteria. I am having trouble with the "Max Price" search filter though. I need it to check against 2 different custom fields, instead of just 1. I’ll try to explain:

Right now, if you type in 300000 in the Max Price filter, you won’t see any results because the filter is comparing the price to a number entered in the "max-price" custom field. The problem is that these homes have a price range instead of a fixed price. I need the Max Price filter to check against both the "min-price" and "max-price" custom fields. Is this possible?

Use passcode MonicaB to view the site.

Thanks,

Marcus

#400576
Bildschirmfoto 2016-05-22 um 19.30.44.png

If the max and min price Fields are 2 different Fields, you can set up 2 different Parametric Search Fields and that will then check against each fields values.

If the max and min prices are actually stored as one price in one field, you can use the comparison Function option in the parametric Search GUI and tell Views to compare the values "BETWEEN" and not as "=".

I added a screenshot of this setting.

This are the only possibilities you will have with Views / toolset.

Related DOC:
https://toolset.com/documentation/user-guides/front-page-filters/
https://toolset.com/documentation/user-guides/filtering-views-by-custom-fields/

Please let me know if you need more infos.

#400952

Ok, that’s what I was afraid of. Thanks for the reply, Beda. I’ll have to think about how to best sort this out.

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