Skip Navigation

[Resolved] Search function is not displaying results properly

This support ticket is created 5 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Shane 5 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#1339087
output-desired.PNG

I am trying to: When the user completes the form (zip code and category) the search results should only display the corresponding meta information for the matched partner as HOA Partner Name, HOA Partner Number and HOA Category (see output-desired.png) Instead, the form is currently displaying all results.

I opened a ticket for this prior, however, the provided code that I was told to upload to the functions.php file caused the filter to hide the forms drop down selection items.

Link to a page where the issue can be seen: hidden link

I expected to see: No results until I enter the zip code and category. Then only the company associated with both.

Instead, I got: All meta info from every HOA Partner and upon submission just a blank bullet point.

#1339177

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2019-09-12 at 3.26.01 PM.png

Hi Josh,

The problem with the empty filters is that you are using this code here

function show_empty_default_func( $query_args, $setting ) {
    if($setting['view_id'] == 783)
    {
        if( !isset($_GET['wpv_post_search'])) 
        {
            $query_args['post__in'] = array(0);
        }
    }
    return $query_args;
}

You view setting is also defaulted to "AJAX results update when visitors click on the search button". This will allow the filters to only display values that will return results.

In this case your view isn't showing anything hence why your filters are like this. To solve this you need to set your view to display all the values.

I have set this up in your view for you so it should now be working.

Also your content is there on the page. It seems something is setting them to display none as well as adding additional classes around the elements . See Screenshot

These additional elements are setting the display properties for the items to none.

I would suggest disabling all the non-toolset plugins and checking again to see if the issue still remains with the items not showing up.

Thanks,
Shane