Content of the page

Woocommerce filter by meta fields


Content of the article

From v.2.2.1/1.2.1 it is possible to make filtering of products using products meta fields data. Extension been created to allow users do filtering for products by: _width, _height, _length, _weight.

  • Firstly you should add meta keys in tab Meta Data
  • Set view (slider,text,checkbox,drop-down,multi-drop-down) for your meta and type (text, number) of data. For example for _width, _weight, _height, _length right choice will be Slider and type number.
  • Press save button
  • In tab Structure set right place in filter for just added meta keys and enable them. Also you can select additional options.
  • Press save button

ATTENTION: this extension does not work with variations of variable products. + When dynamic recount enabled its takes more MySQL queries in the database, especially slider!


5 views-types in search for meta data are possible:

  1. Slider - for numbers only. Values can be decimal only. You can set: range, step, slider prefix, slider post-fix
  2. Text - any text in products meta field data in modes: LIKE, EXACT
  3. Checkbox - 0 or by default. In additional options you can set what value is TRUE, and in such case all another values will be as FALSE. Also it is possible to set mode 'is meta field exists'
  4. Drop-down - Use syntax like: 1,2,3,4 OR title1^value1,title2^value2,title3^value3,title4^value4
  5. Multi-drop-down - the same as drop-down but allows to select in the search form some values and in its additional options it is possible to select filter logic: OR, AND

Meta data keys which are selected in tab Meta Data implemented in: Quick search, Statistic

Faster WordPress Hosting