Back to contents

JetSmartFilters: Setting AJAX Request Type

Discover more about the AJAX request type used with the filters available with the JetSmartFilters plugin.

Tutorial requirements:

Head to WordPress Dashboard > SmartFilters > Settings. Here open the Ajax Request Type tab to adjust the needed settings.

Let’s find out about all the available options.

jetsmartfilters ajax request type
  • Default — the most standard type that works perfectly with third-party plugins and caching. However, mind that dynamic arguments don’t work with this specific type; 
  • Referrer — the type that sends the request to the same default URL, so it’s pretty similar to the previous one. Its advantage is that it also works with dynamic arguments. Though, mind that not all requests are processed correctly, and it works a little slower than the Default type;
  • Self — the type that sends the request to the current page. All the query arguments will work the same way as on the processed page.
NOTE
For static caching, we recommend that you enable the “Don’t cache URLs with GET parameters” setting in the caching plugin you are using. This needs to be done because the original cached page will be displayed after the AJAX filter runs.

Now you can check the filter settings in the editor. So open the needed page in the preferred editor. For instance, let’s look at the Checkboxes Filter settings in Elementor Page Builder.

As you can see, the Apply type is set to “AJAX.”

filter example in elementor

The same settings are available in the Block Editor.

Press the “Publish” button to complete the work with the form.

filter example in block editor

Once the form is displayed on the page, you can select the desired options to filter the content.

filtered content on the front end

That’s it; the filter is working correctly with the AJAX request type adjusted in the JetSmartFilters settings.