Tell us what you are trying to do?
Hello, I am trying to insert a filter that allows the user to narrow down the results that show up. The filters appear and even load once pressed, but then the results don't actually change. In this example (battstaging.com the filter is halfway down the page, called "needs trespass")
Is there any documentation that you are following?
I tried reading some documentation about filtering but couldn't figure it out.
Is there a similar example that we can see?
Yes, for example on AirBnB where the user is able to "downselect" the available properties, for example by checking "allows pets" (which would result in a lower number of results than the initial results)
Hello. Thank you for contacting the Toolset support.
That is strange. I will have to check how you configured your view.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I checked and yes I try to filter the results and its not filtering.
In order to minimize the cause of the issue and to ensure there is no conflict between the theme or plugins you are using:
Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?
- Do you see any difference?
What if you try to create a test page and try to add the existing view to that:
- Do you see it working?
What if you try to create a test page and try create brand new view with all the required filters:
- Do you see it working?
I was able to quickly create a second view, with filters (user is able to search by STATE) here hidden link
👆As you can see, the filter is actually working, meaning this is not a problem with the theme or *other* plugins. It's a problem with the way I have configured the view in the backend, which is why I was writing to ask for help.
👆The name of the view that is not working is called "MapHome." Please help me understand the backend code with this view, and if you're not able to help, please find a colleague or manager that can.
I am frustrated because this is the second time in a week that I've received unhelpful advice from Toolset. Please remember each time we send messages, this is another day lost due to the timezone change. All of the changes you suggested were things you could have quickly verified yourself -- please be respectful of your customer's time.
I understand that how frustrating it could be but we have to follow basic debug steps and sometimes its rewarding and at first glance it helps sometimes to find conflict.
We do not recommond to debug on production sites as if something goes wrong the production site will be down and the aim is to help and fix the issue as soon as possible.
If you really need it I will ask supporter who work in later timezone and you may get quick replay in your timezone.
I checked the following view and it generates the following query and it found no results:
- hidden link
SELECT wp_wifsdw_posts.*
FROM wp_wifsdw_posts INNER JOIN wp_wifsdw_postmeta ON ( wp_wifsdw_posts.ID = wp_wifsdw_postmeta.post_id ) INNER JOIN wp_wifsdw_postmeta AS mt1 ON ( wp_wifsdw_posts.ID = mt1.post_id ) INNER JOIN wp_wifsdw_postmeta AS mt2 ON ( wp_wifsdw_posts.ID = mt2.post_id ) INNER JOIN wp_wifsdw_postmeta AS mt3 ON ( wp_wifsdw_posts.ID = mt3.post_id ) INNER JOIN wp_wifsdw_postmeta AS mt4 ON ( wp_wifsdw_posts.ID = mt4.post_id )
WHERE 1=1 AND (
( wp_wifsdw_postmeta.meta_key = 'wpcf-containment' AND CAST(wp_wifsdw_postmeta.meta_value AS SIGNED) < '100' )
AND
( mt1.meta_key = 'wpcf-firetype' AND mt1.meta_value = 'wildfire' )
AND
( mt2.meta_key = 'wpcf-acres' AND CAST(mt2.meta_value AS SIGNED) > '100' )
AND
( mt3.meta_key = 'wpcf-last-updated' AND CAST(mt3.meta_value AS SIGNED) > '1716422400' )
AND
( mt4.meta_key = 'wpcf-conus' AND CAST(mt4.meta_value AS SIGNED) = '1' )
) AND wp_wifsdw_posts.post_type = 'fire' AND ((wp_wifsdw_posts.post_status = 'publish' OR wp_wifsdw_posts.post_status = 'private'))
GROUP BY wp_wifsdw_posts.ID
ORDER BY wp_wifsdw_posts.post_date DESC
It does not display any results as there are no results. Do you want to add the frontend filters you added to "MapHome" view? What exactly not working as based on this review view is not showing output as it does not find any record for the above query generated by view.
If you share bit more information what is your expected results and share all required details, once I review that I will be able to guide you in the right direction.
I have set the next reply to private which means only you and I have access to it.
Yes, thank you for this information. I apologize if my frustrations came through in my last message.
For the main text list on the homepage, I am trying to allow the users to "downselect" what type of fires show up:
I would like the default option to be a radio button that says "All Fires" (includes both prescribed and also wildfires)
AND
I would like two more radio buttons that allow the user to optionally select either "wildfires only" or "prescribed only" (all fires have a fire type that is one of these two options).
Thank you again and apologies for the previous frustration.
You added the field "Firetype" as textbox. May I know why? As Toolset Types offers option to add Field type Radio or Checkboxes and you can set this field as any of the field type.
if you have only two types value available with the "Firetype" field value that is "wildfire" and "prescribed".
I've adjusted the filter code added to the view's "Search and Pagination" section as given under: