ASP_Query
ASP_Query class usage to fetch results with Ajax Search Pro
The ASP_Query class is a wrapper to access Ajax Search Pro search features programmatically in your own code.
The full class name, with arguments explained can be found in wp-content/plugins/ajax-search-pro/includes/classes/search/class-asp-query.php file
Usage
The class constructor accepts two optional parameters, the arguments, and the search ID
$args (array) - array of search arguments, for the possible arguments please check the asp_query_args documentation
$search_id (int) - the relevant search instance ID. When set, the plugin will fetch the search instance default configuration and use them as the default query arguments. The $args argument can still override this default configuration if needed.
Example uses
For the possible arguments please check the asp_query_args documentation
Generic search by default configuration, without search instance
Search based on configuration of search instance = 1
Generic search with more arguments
Last updated