Developer documentation for the Ajax Load More Filters add-on.
The following filter hooks are available when using this add-on:
Allows developers to take complete control by customizing the returned filter selections for a specific filter key.
The following code snippet returns custom filter values ordered by name in ascending order for the category (key) query of the blog (id) filter.
Note: When using this filter you must return both a label and value in the array.
This filter will set a default fallback value for a filter block.
The following code snippet will set work, post as fallback post_type value when zero items are selected for the search filter group.
Note: Return values in this hook should (in most cases) directly relate to values already set in the core Ajax Load More shortcode.
This filter will set a default pre-selected value for a filter block and is available for the radio, checkbox and select field types only.
The following code snippet will set design as the pre-selected category value of the portfolio filter group.
Note: When using this filter you must also set this value in your core Ajax Load More shortcode.
Adds custom classes to select element wrappers. This is useful for users who are using select replacement techniques.
Set a default value of submit button label.
Update the default HTML of each filter title element.
Disable the filter edit button for logged in (admin) users.
The almFiltersActive() function is dispatched after a filter submit action and returns an object containing the key/value pair combinations of active filters.
The almFiltersChange() function is dispatched when a filter change event is triggered.
The almFiltersComplete() function is dispatched after the filter process has completed.
The almFiltersURLUpdate() function is dispatched after the browser URL has been updated.
The almFiltersClear() function will clear and reset an Ajax Load More filter instance.
Below are common questions regarding the Filters add-on. If you have a question and don’t see an answer here, please visit the support page and submit your request.
Filters can be rendered to screen using any of the following form element styles:
You can create filters based on any of the following WordPress query parameters:
Note: Each supported query parameter directly relates to an Ajax Load More shortcode parameter.
When a filter is saved or modified it is stored as an option in the WordPress Options table.
No, once a filter has been deleted it is gone for good.
If you are using Select2 on elements inside filters you will need to manually dispatch change events so the Filters add-on can respond to the event.
« Back to Add-ons