The Filters add-on provides front-end and admin functionality for creating, managing and displaying Ajax Load More filters.

A no-coding required solution that makes filtering with Ajax Load More easy and intuitive for both developers and users.

How It Works

The Filters add-on works by rendering Ajax filter controls (via shortcode) that target and hook into a single Ajax Load More instance. When a user interacts with a filter, the add-on generates a modified query object and passes the query to Ajax Load More for display.

Each time a filter is run, Ajax Load More generates a unique browser URL based on the selected filter parameters. Users are then able to share a direct URL to filtered content or use their forward and back buttons to browse previous filter states.

The Filters

On the back-end, Filters are created using the filter management tool which provides functionality for building and managing all the various filter combinations and options. The management tool allows you to select a query parameter, choose the form element style and even allows you to chain filters together to create an advanced filtering form.

On the front-end, a custom JavaScript module manages filter interactions, URL updates and the passing of data to Ajax Load More.

TL;DR

It’s a tool for both the back-end and front-end of your website that allows you to create complex filter queries without writing a single line of code.


Examples

Basic Example

The following is a basic filtering example using a category filter with a radio button field type. Notice that when you make a filter selection both the browser URL and the Ajax Load More content update.

More Examples

View the Implementation section below for information on how to build and load filters.


Implementation

Implementing Ajax Load More Filters is essentially a three step process.

Step 1 – Create Filter and Shortcode

Start by visiting Ajax Load More > Filters in your WordPress admin and create a new filter by entering a unique ID, selecting an interaction style and building the filter blocks that will consist of your filters.

Ajax Load More Filters

After a filter has been created and saved, the generated filter shortcode is ready to be added to a WordPress page or template for display – don’t worry if it’s not perfect, you can always go back and make edits/adjustments to the filter afterwards.

Filters Shortcode[ajax_load_more_filters id="category_filters" target="my_alm_filters"]

The above shortcode can be added to your page in the location of your choosing.

Step 2 – Create Ajax Load More Shortcode

The next step is to modify your existing Ajax Load More shortcode to allow for filters to be initiated on the Ajax Load More instance.

To do this, set filters=”true” and also set the target parameter as the filter ID. You will also want to double check the Ajax Load More ID matches the target parameter in the Filters shortcode (as seen above).

Ajax Load More Shortcode[[ajax_load_more id="my_alm_filters" filters="true" target="category_filters"]]

See the Shortcode Parameters section below for documentation on additional Filter parameters.

Step 3 – Adding the Shortcodes

The final steps is to add both the Filters and Ajax Load More shortcodes to your page or template. For this example, the shortcodes have been added directly to a custom page template using the do_shortcode implementation method.


Filter Management

We’ve taken any guess work out of creating filters by building an administration tool to help you create, modify and manage filters. The tool allows you to build filter blocks based on preconfigured parameters leaving little room for error.

When a filter is created (or modified) the data is stored in the Options table of your WordPress database and then accessed on the front-end when filters are rendered for display.

Field Types

When building out a filter you can select from four different form element styles for display.

Each element style displays and functions differently, so choose wisely depending on the type of filtering required.

Checkbox

The checkbox field type allows users to select multiple values for a filter.

Radio

The radio field type allows users to select a single value only for a filter.

Select

The select field type displays a select box and allows for a single selection.

Textfield

The textfield field type displays a user input field and submit button (if selected).

Date Picker

The date picker field type displays a calendar and allows for a single, multiple or date range selection.

Chaining Filters

One of the favorite features is the ability to chain filters together to create complex filter groups that can consist of many different query parameters.

Add and Remove Ajax Load More Filters

As seen in the screenshot above, it’s as easy as clicking buttons to add and remove filter blocks as your requirements change.


Shortcode Parameters

The following groups of shortcode parameters are available with the Filters add-on. Please note, both the standard Ajax Load More shortcode and the Filters shortcode have a target parameter which is required to connect the filtering functionality to Ajax Load More.

Filters Shortcode

This shortcode accepts two required parameters: id and target.

id The ID of the filter set.required
target The ID of the Ajax Load More instance to target.required
Example Shortcode[ajax_load_more_filters id="search_filters" target="alm_search_results"]

Ajax Load More Shortcode

The standard [ajax_load_more] shortcode has the following parameters to help with set up and initiation of filters.

target The ID of the Filters instance Ajax Load More will target .
filters Enable filters with this Ajax Load More instance.(true/false)
filters_url Update the browser querystring with active filters values. Default = true
filters_paging Add ‘?pg=x’ to the browser querystring as users load additional pages. Default = true
filters_scroll Automatically scroll users to the top of list after a filter update. Default = false
filters_scrolltop The offset top position of the window used with Paging Parameters and Scroll. Default = 30
filters_analytics Send pageviews to Google Analytics.(true/false)
filters_debug Enable debugging of the Ajax Load More filter object in the browser console.(true/false)
Example Shortcode[ajax_load_more id="alm_search_resultstarget="search_filtersfilters="true"]

Shortcode Builder

Once installed, the Filters add-on provides the following options in the Ajax Load More Shortcode Builder.

Ajax Load More Shortcode Builder


Installation

Upon purchase of this add-on you will receive a confirmation/purchase receipt email. Your receipt will contain a direct link for downloading your copy of Ajax Load More: Filters and a license key.

After downloading the add-on, upload the unzipped files to your /wp-content/plugins/ directory or visit your plugins dashboard and upload the downloaded .zip under Add New.

License Activation

To activate your add-on and receive updates directly in your WordPress plugins dashboard users are required to enter the license key that was included with their purchase receipt.

To activate a license key:

  1. Visit the Licenses section within the Ajax Load More plugin.
  2. Enter the product key and click Activate License.
  3. If the status indicator turns green your add-on has been successfully activated (example below).
License Key Example

If you did not receive your confirmation/purchase receipt email and license key, please check your spam/junk folder and if you still cannot locate the email please contact me at darren [at] connekthq.com or use the Product Support form on the website.