On this thread Christian Cox helped me troubleshoot my View search results:
https://toolset.com/forums/topic/troubleshoot-wpv_filter_query-in-functions-php/
It works fine, and now I am attempting to re-create this same View on a different site. The problem is that no matter what options are chosen in the filter on the new site, all results are displayed.
So I am not sure what I am doing wrong. I have updated the code in functions.php to point to the new View.
The View can be seen here:
hidden link Choose first one and then another filter option and note how the results are always the same.
I can upload the xml of the View or provide credentials in a private post
Hi, the first thing I noticed is that there are 3 JavaScript errors in the browser console on this page. Those may need to be fixed, but we can try a couple of other troubleshooting steps first:
- Modify the settings so that Views update the URL when performing searches. Go to Toolset > Settings > Frontend Content > Browser History Management and check both checkboxes. Test again.
- Temporarily deactivate all plugins except Types and Views. Test again.
- Make sure the custom field slugs on the new and old site use identical slugs
- Take a picture of the Content Selection and Query Filter sections of the View editor screen and attach it here for me to review.
Thank you for the fast response.
1. I too noticed the 3 JS errors and determined they are not being caused by Toolset. When I deactivate TS they remain, and can be removed when I eliminate other elements/plugins on the page.
2. I checked both boxes and re-tested but no change.
3. deactivated all plugins and no change
4. slugs are same because they are coming from the same plugin (this plugin uses an API to pull CPT data from our CMS)
5. screenshots attached
I'm not able to see the Query Filter section, so it may be deactivated in your admin screen settings. Please scroll to the top right of the editor screen and click "Screen Options", then enable the Query Filter section and take a screenshot showing the Query Filter configurations for me to review.
My apologies. I had forgotten about setting the query filters when re-setting up my View in this 2nd site. Your question solved my issue. Thank you again.