1. Home
  2. Query Elements
  3. Dynamic Tags
  4. Query Parameter and the Archive Widget

Query Parameter and the Archive Widget

The main dynamic tag you will be using when integrating the Archive widget with the filter widgets is the Query Parameter dynamic tag.

Enter the query parameter you configured on the filter widget in the “Query Parameter” text field.

Set the default value that should be used.

Depending on your value type you need to choose Number or string. If you are using for example slider and checkbox ranges most likely it will be Number.

Example configurations

Checkbox ranges & Meta Query Mixed ranges

Checkbox Range

Add the ranges you want to display to visitors.

Meta Query Section

Add an item in the section.

Meta Query example
  1. Enter the meta key to use
    (If you use ACF have Advanced Elements you can use it’s tags and enable return key name)
  2. Select MIXED RANGES in compare
  3. Value type should be numeric
  4. Meta value should be dynamic tag Query parameter.
Query Parameter pop-up

In the dynamic tag pop up enter the query parameter that should be retrieved. The default value should be a range of values, make it the max and min values for your range. It should be separated with a colon, min:max. The type needs to be string otherwise the value will be converted to a numerical value. Use the default method GET.

Slider (Single) & Meta Query

Slider

Enter the query parameter.

Meta Query Section

  1. Enter the meta key to use
    (If you use ACF have Advanced Elements you can use it’s tags and enable return key name)
  2. Select >,<,>=,<= in compare depending how you want the slider value to be compared.
  3. Value type should be numeric
  4. Meta value should be dynamic tag Query parameter.
Query Parameter pop-up

In the dynamic tag popup enter the query parameter that you wrote in the Slides widget. Set the default value that suits your purpose and select Number as type so the value is compared correctly.

Slider (Range) & Meta Query BETWEEN

Ranged Slider

Configure your slider with query parameter, values and min max default values.

Meta Query Section

  1. Enter the meta key to use
    (If you use ACF have Advanced Elements you can use it’s tags and enable return key name)
  2. Select BETWEEN in compare. Two new value fields will appear.
  3. Value type should be numeric
  4. Meta values should be dynamic tag Query parameter.
Query Parameter pop-up

Meta Value

The query parameter should be the query parameter for the Slider Range with “_min” appended.

Meta Value 2

The query parameter should be the query parameter for the Slider Range with “_max” appended.

Updated on August 4, 2020

Was this article helpful?

Related Articles