Skip Navigation

[Resolved] Custom search based on taxonomy displays results quite randomly

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

Problem: I have a custom post type View that includes a custom search Form. The results update with AJAX whenever a filter is changed. The results are inconsistent depending on whether I load the page or apply a filter.

Solution: Make sure the "Don't include current page in query results" checkbox is unchecked in your View's settings.

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

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by Mykola Yabchenko 6 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#1108783

I am trying to:
I have database of organizations which can operate in different countries. Countries are custom taxonomy.
I have created an archives page with custom search. Custom search is a dropdown select to choose 1 country but every organization have have several countries.
When I visit archive page for the first time I see all 3 orgs.
Org1 - Italy, Ukraine
Org2 - Germany, Italy
Org3 - France, Germany
When I select France from dropdown - page says No item founds
When I select Germany from dropdown - page shows Org2 while Org3 should be displayed also. After this selection France disappears from the dropdown list of the filter.
When I select Italy from dropdown - page correctly displays 2 organizations
When I select Ukraine it shows Org1 which is fine.
When I select All organizations - It shows me only 2 - Org1 and Org2

Link to a page where the issue can be seen:
Since my site is in Ukrainian I have created a test setup in English at hidden link

#1109068
Screen Shot 2018-09-16 at 3.26.18 PM.png

Hi, the checkbox "Don't include current page in query results" should be unchecked here. I have made this change and I believe the View is displaying the correct results now. Can you confirm?

#1109474

Great! Thank you, Christian!