Code

WP Live Content Filter

WP Live Content Filter

UPDATE 3.5:

Now it is possible to disable the user input into filter, to let the user to filter only by using filter presets.It is something like a “combo” select…

Description

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.

  1. Ease of use via shortcode button generator
  2. The filtering works up to 500 elements
  3. Multiple filters on a page and grouped filtering on the same data
  4. 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
  • filter presets
  • disable user input (user can change the filter only via filter presets)
  1. Styling customization via configuration page:
    • background color
    • text color
    • borders styling
    • icon buttons colors
    • preset labels background and text color
  2. Filtering animation via Mixitup by Kunkalabs
    • duration
    • effect
    • easing
  3. Automatic Woocommerce product page integration, customizable via configuration page
  4. Fully translatable via .PO files.
  5. ReduxFramework-made configuration page
  6. TGM-Plugin-Activation dependancy installer
  7. Built on Wordpress Plugin Boilerplate by Tom McFarlin.

Installation

This section describes how to install the plugin and get it working.

  1. Upload wp-live-content-filter folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the Plugins menu in WordPress
  3. If needed install Redux Framework plugin

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" input_disabled="yes"]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.
  • input_disabled (optional): specify if the user can write into the filter box or not. Useful if you want to let the user to user the filter only by filter presets. Default: no
  • class (optional): class applied to filter input box, for styling purpuoses.
  • placeholder text: the text displayed as placeholder of the filter input box

To create two filter input boxes that can filter the same data (something like “name” and “surname” filter) you can use the filter_group parameters.

Check the documentation and the demo site for more informations.

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!

Changelog

3.5 – 13/04/2018

  • Bufix for Woocomerce filter

3.4 – 01/11/2016

  • Added button filter shortcode

3.3 – 01/12/2015

  • Added capability to disable user filter input (user can use only filter presets)

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.

Licenses

http://codecanyon.net/licenses/faq http://codecanyon.net/licenses/regular http://codecanyon.net/licenses/extended http://codecanyon.net/legal/

The author of this plugin holds a commercial license allowing commercial use of the MixItUp filter and sort software. If you wish to edit the functionality of this MixItUp integration for use in your own commercial project, you must purchase a license from https://mixitup.kunkalabs.com/licenses/

by
by
by
by
by
by