As of Conductor version 1.5.0, Conductor Widgets support AJAX requests for querying content. Conductor Widget AJAX requests utilize the Conductor REST API.
How Do Conductor Widget AJAX Requests Work?
Conductor Widget AJAX requests work like this:
Conductor first determines if the Conductor Widget has AJAX enabled. If AJAX is enabled on the Conductor Widget, event listeners are added to various Conductor Widget elements (i.e. pagination links). When one of these elements is interacted with (i.e. clicked), a Conductor Widget AJAX request is created.
As of version 1.5.0, Conductor Widgets use the POST request method when making requests to the Conductor REST API.
Technical Details
Conductor Widget AJAX requests will send the following extra data by default:
conductor_widget (Boolean): Flag to specify whether or not the request originated from a Conductor Widget
Default: true
pagenum_link (string): The current pagenum link; used for the pagination portion of the query results
Default: The current URL without any pagination parameters
is_front_page (Boolean): Flag to specify if the AJAX request originated from the front page; used for the pagination portion of the query results
Default: true if is_front_page(), false if not is_front_page()
is_single (Boolean): Flag to specify if the AJAX request originated from a single post; used for the pagination portion of the query results
Default: true if is_single(), false if not is_single()
Conductor Add-Ons
Some Conductor add-ons may add their own extra data to pass along with the AJAX request. See Filtering Add-On or Query Builder Add-On.