WP Residence Help WP Residence Help

  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API
Home / Theme Options & Global Settings / Custom ajax handler for searches (for WPML or special hostings)

Custom ajax handler for searches (for WPML or special hostings)

3013 views 0

Content

  • What this option does
  • Recommended setting for WPML sites
  • Where to change the option
  • When to use Yes
  • WPML extra check

What this option does

The option Use custom ajax handler for searches? controls how AJAX search requests are processed by the theme.

  • Yes: the theme uses its custom AJAX handler for search requests.
  • No: the theme uses the standard WordPress AJAX flow for search requests.

This setting is especially important on multilingual websites. When a search uses AJAX, the results are loaded without a full page refresh, so the request must still know which language is currently active.

If the AJAX request does not keep the correct language, the search may return results from the default language, show mixed-language results, or not load the expected translated results.

Recommended setting for WPML sites

If your website uses WPML, set Use custom ajax handler for searches? to No.

This allows the search request to use the standard WordPress AJAX flow, which is better suited for WPML language handling.

Recommended for WPML:
Set this option to No if search results do not show correctly in translated languages, or if results load from the wrong language.

Where to change the option

Go to:

Theme Options > Advanced Settings > Theme Speed Settings

Find:

Use custom ajax handler for searches?

For WPML websites, set this option to:

No


WPResidence custom AJAX handler setting for searches

When to use Yes

You can use Yes if the website does not use WPML and search works correctly with the custom AJAX handler on your server.

You can also keep Yes if you tested the search carefully and all results load correctly in all needed languages.

If the server blocks custom AJAX handler files, or if searches do not return the correct results, set this option to No.

Simple rule:
For WPML websites, use No. For non-WPML websites, use Yes only if search works correctly on your server.

WPML extra check

WPML also includes a setting for frontend AJAX language filtering.

You can check it from:

WPML > Languages > Language filtering for AJAX operations

Enable:

Store a language cookie to support language filtering for AJAX

This option helps WPML pass the current language to frontend AJAX requests. WPML explains that some themes and plugins need this option because AJAX calls happen in the background and must still return content for the correct language. When enabled, WPML sets a language cookie with JavaScript so AJAX operations can return the correct content for the selected language. :contentReference[oaicite:0]{index=0}

In practical terms, this can help when search filters, map results, property lists, or other dynamic elements return content from the wrong language.

Important:
If translated search results still do not load correctly after changing the WPResidence AJAX setting, also enable the WPML language cookie option and clear any cache used on the website.

WPML documentation:
Enabling a language cookie to support AJAX filtering

Theme Options & Global Settings

Related Articles

  • How to Control Similar Blog Posts
  • ACF – Advanced Custom Fields – Integration with WPResidence
  • Theme Options – Roles (Editor) Permissions Controls
  • Theme Options -> Agent Card Settings

Help Categories

  • 18Agent, Agency & Developers
  • 5Blog Posts & Blog Lists
  • 38Elementor Shortcodes Built-In
  • 45FAQ
  • 15Footer
  • 5Getting Started
  • 37Header
  • 2IDX & MLSImport
  • 6Installation & Setup
  • 23Installation FAQ
  • 23Maps & Location Settings
  • 21Multi-Language - Third Party Plugins
  • 6Other Third party Plugins
  • 20Pages
  • 4Payments & Monetization
  • 20Property Lists, Categories & Archive
  • 37Property Pages & Layouts
  • 31Search & Filtering
  • 162Technical how to | Custom Code Required
  • 8Technical: Actions and filters
  • 6Technical: Child Theme
  • 86Theme Options & Global Settings
  • 7Translations & Languages
  • 16WPBakery Shortcodes
  • 50WPEstate / WPResidence Translate Plugin
  • 51WPResidence / WPEstate CRM
  • 50WPResidence 5.0 Documentation
  • 8WPResidence Elementor Studio

Join Us On

Powered by WP Estate - All Rights Reserved
  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API