Skip Navigation

[Waiting for user feedback] ajax search not working on query/filter

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.

This topic contains 6 replies, has 1 voice.

Last updated by Christopher Amirian 4 days, 14 hours ago.

Assisted by: Christopher Amirian.

Author
Posts
#2816277

hidden link
I've got this set up as radio buttons with "AJAX results update when visitors change any filter values"

It doesn't show any results when you click on any of the buttons.

If I add a search button and change to Full page refresh when visitors click on the search button or
Full page refresh when visitors click on the search button with input values auto-updating
it works...
but a search button won't make sense on this one - I need the AJAX to work! can you help?

Additionally, I don't like how the child category added a dash - before the name. How can I remove this? If it was CSS, i could remove it, but they inject it so I can't figure out how to remove it. I need it to stay a child but look like everything else.

Thanks!

#2816360

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Welcome to Toolset support.

When “AJAX results update when visitors change any filter values” is selected the View relies on a wrapper DIV that Toolset prints around the results.
If the option “Disable the wrapping DIV around the View” is checked, that DIV is missing and the JS that updates the results has nothing to target – the View returns an empty list.

For more information:
https://toolset.com/forums/topic/filtering-using-ajax-refresh-doent-work/

Fix:

1. Edit the View → Screen Options ▸ enable “Loop Output” if hidden.
2. In Loop Output ▸ Display settings un‑check Disable the wrapping DIV around the View.
3. Keep the Custom‑search setting AJAX results update when visitors change any filter values.
4. Save → the radios will now refresh the list without a button.

Toolset usually adds dash with a CSS ::before rule on labels that have the class wpv-filter-term-level‑1 (level 2 gets two dashes, etc.).
You can hide it with one line of CSS:

.js-wpv-filter-form .wpv-filter-term-level-1 label::before { content:none; }

But I am not sure if that is what you meant.

Thanks.

#2816396

Hi! Thanks for the response. OK, I dug in and I see that the "disable" is not checked? I did have the view referencing a different template, so I went ahead and made it in the same view to see if that would work and no luck. Can you refresh and review to see what I mean. Feel free to login and verify that I have it correct.

Also, I tried your CSS to remove the dash but it didn't work. It seems that my output is creating different classes and it's not using the ::before pseudo class...

#2816544

Christopher Amirian
Supporter

Languages: English (English )

Hi,
Thank you. So what I suggest for you is to create a new view as a test, and you use the Loop Editor and the GUI to create the loop and the filter without adding any customization.

Add it to a sample page and test with a minimal installation:

- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Switch to the default theme such as "TwentyTwenty" by going to "WordPress Dashboard > Appearance > themes".
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except Toolset and Toolset add-ons.
- Check if you can still recreate the issue.
- If not, re-activate your plugins one by one and check the issue each time to find out the plugin that causes the problem.

See if it fixes the problem. If yes, please do your customization on the new view.

The reason I ask this is because most probably some sort of DIV or HTML tag is not added correctly somewhere.

For the CSS please give me the link to the page and screenshot so I can know where to check for the dash and I will investigate.

Thanks.

#2816570

Thanks! The troubleshooting with a fresh view helped. It was working all along, but an animation class was setting it to 0 transparency... weird! All set. Thanks

#2816571

Shoot - I forgot about the dash - this is the link to the page:
There are no unique css classes or ids, so I don't know how to remove it!

hidden link

#2816838

Christopher Amirian
Supporter

Languages: English (English )

Screenshot 2025-07-20 at 7.34.39 PM.png

Hi,

Thank you. Are you talking about the + character in the attached image?

As you set the ticket as resolved the private information is deleted by the system.
I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

I want to check and see how it is added in the view as I do not remember about that + icon being added by Toolset

#2818476
#2818779

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Thank you for the login information. I explained the situation in the video below:

hidden link

The improved JS code I used in the View in question is this:

function removeDashes() {
    jQuery('.form-group.statusfilter .form-check-label').each(function() {
        var text = jQuery(this).text().trim();
        jQuery(this).text(text.replace(/^\-\s*/, '')); // Remove leading "- "
    });
}

// Run once on page load
jQuery(document).ready(function() {
    removeDashes();
});

// Run again after AJAX updates the filter
jQuery(document).on('js_event_wpv_parametric_search_results_updated js_event_wpv_parametric_search_form_updated', function() {
    removeDashes();
});

That fixed the problem.

Thanks.