Version 5.6.0 of Ajax Load More was released yesterday. This point release focused on code refactoring, modernization and new the Facet Filtering functionality found in the Filters Add-on.
Keep reading to find out what’s new in 5.6 and what’s coming up in the next release.
🔥 What’s New in 5.6
Facet Filtering
In the works for well over 5 months, Facet Filtering is an exciting addition to the Filters Add-on and was definitely one of the most requested features of the plugin since its inception. I’m happy to get this feature out the door and start collecting feedback on the functionality and implementation.
What is Facet Filtering
Facet filtering is a type of search filter that allows users to narrow down their search results quickly while preventing zero results from being returned. The facets (or filters) dynamically adjust on the fly based on the users previous selections and provides visual feedback about the remaining options.
Public JavaScript Functions
I’ve refactored the click event and added two new functions for retrieving post data.
Click
The deprecated almTriggerClick function has been renamed to click and has been refactored to make it easier to target a specific ALM instance – read more.
1 2 |
// [ajax_load_more ...] ajaxloadmore.click(); |
getPostCount
This function will return the loaded post count by ALM instance ID – read more.
1 |
var count = ajaxloadmore.getPostCount(id); |
getTotalPosts
This function will return the total number of posts by ALM instance ID – read more.
1 |
var count = ajaxloadmore.getTotalPosts(id); |
ALM JavaScript Object
Each instance of Ajax Load More (alm) is now available in the global window scope and accessible via JavaScript. This makes all functions, variables and Ajax Load More config data available by accessing the window.ajax_load_more in your console or external JavaScript file.
1 2 |
// [ajax_load_more ...] console.log(ajax_load_more); |
When a unique ID has been set to an ALM instance you must append the ID to the end of the object name.
1 2 |
// [ajax_load_more id="movie_listing"] console.log(ajax_load_more_movie_listing); |
How to Test
On a page with Ajax Load More active, open your developer console and type ajax_load_more directly in the console window to view the results of the global alm object.
I’ve found this object in the global scope to be very useful for debugging and hope it’s useful for others as well.
Other Improvements and Bug Fixes
- NEW: Added support for include_children when running a taxonomy query.
- FIX: Fixed issue with localized data variables not working in Full Site Editing (FSE) themes.
- FIX: Fixed deprecation notice in Elementor widget registration.
- UPDATE: Security fix for escaping data attributes in shortcode.
- UPDATE: Ongoing code cleanup and modernization.
What’s Next
- Cache Add-on Rebuild
Work has begun on a complete rebuild of the Cache add-on which will feature custom database tables for storing cached data. - Next Page Add-on Updates
A major update to the Next Page add-on will include a feature for loading custom field data via Next Page inegration.
Let me know what you think about the changes in Ajax Load More 5.6 (or anything else) in the comments 🙂