WP Live Content Filter

WP Live Content Filter


This plugin provide an input box to filter a specified DOM selector (like `.products li` or `item`) and hide those who does not contain the inputed text. User start writing into the input box and the plugin start filtering the DOM elements, hiding those who does not contain filter text.

Filtering can be done with preset words buttons which fill automatically the filter with customized words.

In addition the plugin let you order the filtered element in ascendig or descending order the filtered resulting elements and change the layout (list or grid) of the elements.

The plugin work with a shortcode which let the user customize pratically all the parameters (see `Shortcode use` section to view a full list).

Customizations of the filter box appearance and the animation parameters can be done from configuration page.

It is possible to integrate the filter into the Woocommerce product page: in this case the customization can be made via configuration page.

This plugin require Redux Framework plugin to work. TGMPA plugin is provided to install required plugin on activation.

Feature list

This section describes the features of the plugin.

  • Ease of use via shortcode button generator
  • Multiple filters on a page and grouped filtering on the same data
  • Customizable shortcode parameters: * input box text * filter DOM selector * filter type * effect DOM selector * custom class * display clear filter button icon * display sorting results button icon * display layout change button icon
  • Styling customization via configuration page: * background color * text color * borders styling * icon buttons colors * preset labels background and text color
  • Filtering animation via Mixitup by Kunkalabs * duration * effect * easing
  • Automatic Woocommerce product page integration, customizable via configuration page
  • Fully translatable via .PO files.
  • ReduxFramework-made configuration page
  • TGM-Plugin-Activation dependancy installer
  • Built on WordPress Plugin Boilerplate by Tom McFarlin.

Shortcode use

This section describes how to use the plugin shortcode.

This is the minimal user of the shortcode

`[wp-lcf container_selector=”ul.list” filter_selector=”li”]Write your custom placeholder here[/wp-lcf]`

In this way the plugin display a text box which let the user write a text used to filter the elements specified into filter_selector, which has to be indicated as children of container_selector DOM element.

When user start writing the plugin search into ALL THE CONTENT of the specified DOM elements. When the inputed text is found the element remain visible, otherwise the element will be hidden.

Here is and example of advanced use with all parameters:

`[wp-lcf container_selector=”.list” filter_selector=”li .title” filter_type=”containText” sort_button=”yes” clear_button=”yes” layout_button=”yes” layout_type=”list” effect_selector=”li” filter_presets=”text1,text2”]Write something here[/wp-lcf]`

  • `container_selector`: specify the root element for the filtering target elements
  • `filter_selector`: specify the element where the search will be performed. Must be specified as children of `container_selector`. As example, if `container_selector` is `ul.list`, then `filter_selector` must be something like `li` or `li .title`.
  • `filter_type` (optional): specify the type of search performed to hide or show elements: can be `startWithText`, `endWithText` or `containText`. Default value: `containText`.
  • `clear_button` (optional): can be `yes` or `no` and let you decide if you want to display or not the clear filter button icon. Default: `yes`
  • `sort_button` (optional): can be `yes` or `no` and let you decide if you want to display or not the sort button icon. Default: `no`
  • `layout_button` (optional): can be `yes` or `no` and let you decide if you want to display or not the layout change button icon. Default: `no`
  • `layout_type` (optional): if `layout_button` paramenter is set to `no`, you can specify if the filtering target data are in `table` layout, if `layout_button` parameter is set to `yes`, you can specify the starting layout, choosing betweem `list` or `grid`. Default: `list`.
  • `effect_selector` (optional): specify the target element to be filter (hidden or shown). As for `filter_selector` this must be specified as children of `container_selector`. If not specified `filter_selector` will be used.
  • `filter_presets` (optional): specify the preset values for the filter (comma separated values). Let the user to click the preset and set the configurated value.
  • `class` (optional): class applied to filter input box, for styling purpuoses.
  • `placeholder text`: the text displayed as placeholder of the filter input box

Is it possible to create two filter input boxes that can filter the same data (something like “name” and “surname” filter).

Check <http://wpdemo.accolore.com> to view the demo.

The animation parameters can be customized from the configuration page. The plugin provide a shortcode generator button into TinyMCE content editor.

Woocommerce integration

To enable the filter input box into Woocommerce product page you have to go to the WordPress WP Live Contet Filter configuration page and set to yes the `Enable integration` flag.

This will enable the customization option into the configurationa page too.

In Woocommerce It will not be possible to display the sort button due to the presence of the native sorting options: it will a duplicate!


3.2 – 12/06/2015

  • Fixed bug with multiple filters sorting

3.1 – 29/04/2015

  • Added configuration page preset labels color options (text colors and background)
  • Added table layout (to use the filter into table-based data)
  • Added grouping capability to do multiple filtering on the same data

3.0.1 – 16/04/2015

  • Changed configuration page for Redux Config 3.5 update

3.0 – 20/03/2015

  • Filtering animation rewritten to use Mixitup by Kunkalabs <https://mixitup.kunkalabs.com/>
  • Added change layout option
  • Fixed Chrome and Opera compatibility
  • Configuration page restyling
  • Documentation update

2.0.1 – 06/03/2015

  • Minor bug fixing for javascripts and css

2.0 – 27/02/2015

  • Added sorting options (user can order the filtered results)
  • Added filter preset words (user can filter with buttons insteas of writing)
  • Minor bug fix
  • Documentation update

1.3 – 21/02/2015

  • Added styling options from configuration page
  • Documentation update

1.2.1 – 18/02/2015

  • Minor bug fix

1.2 – 16/02/2015

  • Added search type parameter
  • Added separate search target and effect target parameters
  • Javascript optimization
  • Documentation update

1.1 – 10/02/2015

  • Added separate hide and show effects parameters
  • Added Animate.css animation effects
  • Minor mispelling corretions
  • Documentation rewrite.

1.0 – 25/01/2015

  • First release.
Date: July 1, 2015