WP Residence Help WP Residence Help

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

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

2988 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

04. Theme Options & Global Settings

Related Articles

  • ACF – Advanced Custom Fields – Integration with WPResidence
  • Theme Options – Roles (Editor) Permissions Controls
  • Theme Options -> Agent Card Settings
  • Theme Options > General Settings > Forced Registration

WP Residence Documentation

  • 01. Getting Started
    • How to Get Support
    • Get your buyer license code.
    • Use SSL / https
    • Server / Theme Requirements
  • 02. Installation & Setup
  • 03. Installation FAQ
  • 06. Search & Filtering
    • Advanced Search Display Settings
    • Advanced Search Form
    • Geolocation Search for Half Map
    • Save Search Theme Options
    • Advanced Search Colors
  • 09. Agent, Agency & Developers
  • 08. Property Pages & Layouts
  • 07. Property Lists, Categories & Archive
  • 14. WPResidence Elementor Studio
  • 10. Blog Posts & Blog List
  • 11. Shortcodes
    • Contact Form
    • Featured Agency/Developer
    • Membership Packages
    • Testimonials
    • Google Map with Property Marker
    • Listings per Agent, Agency or Developer
    • Display Categories
    • Agent List
    • Recent Items Slider
    • Recent items
    • List Properties or Articles by ID
    • Featured Agent
    • Featured Article
    • Featured Property
    • Login & Register Form
    • Icon Content Box Shortcode
  • 12. Widgets
  • 04. Theme Options & Global Settings
    • General Settings
    • User Types Settings
    • Appearance
    • Logos & Favicon
    • Header
    • Footer Style and Colors
    • Price & Currency
    • Property Custom Fields
    • Features & Amenities
    • Listing Labels
    • Theme Slider
    • Permalinks
    • Splash Page
    • Social & Contact
    • Map Settings
    • Pin Management
    • How read from file works
    • General Design Settings
    • Custom Colors Settings
    • Header Design & Colors
    • Mobile Menu Colors
    • User Dashboard Colors
    • Print PDF Design
    • Property, Agent, Blog Lists Design Settings
    • Sidebar Widget Design
    • Font management
    • How to add custom CSS
    • Custom Property Card Unit – Beta version
    • Email Management
    • Import & Export theme options
    • reCaptcha settings
    • YELP API Integration
    • iHomefinder Optima Express IDX
    • MEMBERSHIP & PAYMENT Settings
    • Property Submission Page
    • PayPal Setup
    • Stripe Setup
    • Wire Transfer Payment Method
  • 20. Translations & Languages
  • 24. FAQ
  • 10. Pages
  • 11. Header
  • 12. Footer
  • 05. Maps & Location Settings
  • 18. Payments & Monetization
  • Plugins
    • 22. Third Party Plugins – IDX Compatibility
    • 21. Third-Party Plugins – Multi-Language
    • 23. Third party Plugins – Other
  • Technical
    • 26. Technical how to | Custom Code Required
    • 25. Technical: Child Theme

Join Us On

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