02 Feb 2022
We are excited to announce another highly demanded feature, the Ajax post filter. We've extended our existing post filter feature with Ajax capability. The old post filter we had was only able to filter the posts already queried on the page. With the new Ajax feature, users can filter and query posts on the whole site (including the posts that are not queried on the page). The new Ajax post filter is perfect for sites with a lot of posts/products. It allows users to select categories from the post filter navigation and then click on the "Load More" button to load more posts infinitely until there is no more post. To see this in action, view our Post Filter and WooCommerce product filter demo.
Ajax Post Filter
The Ajax post filter option has been added on the following modules:
- Builder's Post module (available on any Themify theme or Builder plugin)
- Portfolio module (required Themify Portfolio plugin)
- WooCommerce addon (required Builder WooCommerce)
- Advanced Posts (required Builder Pro)
- Advanced Products (required Builder Pro)
To enable the Ajax post filter feature, drop in one of the above modules on the module options. First enable the "Post Filter" and then enable the "Ajax Filter" option. Once you enable the Post Filter option, you will also see the additional options: URL Hushtag, Exclude Category, and Sort Filter.
With the URL Hushtag option enabled, when user clicks on the post filter category, the browser address bar will have a hushtag. If you go to the URL with the hushtag, it will scroll the page to the location where you have the post filter and open the selected category.
If you have the Ajax post filter enabled, all categories are present on the filter navigation by default. If you want to exclude certain categories, you would enter the category IDs in a comma-separated list.
The sort filter lets the user to sort the posts by title or date in ascending/descending order. This feature is also available on the Builder WooCommerce addon. So users can sort products by title, date, price, and rating.
To enable the load more button, make sure the "Page Navigation" is enabled. When there are more posts in the query, the load more button will present. It is a nifty feature that allows users to go through all posts without having to redirect to another page.
WordPress 5.9 Compatibility
There have been a lot of changes in WordPress 5.9. We are happy to announce that all Themify themes and plugins are compatible with the latest WordPress 5.9. It is safe to update your Themify themes/plugins to the latest version. Cheer!