Pre-filtering results on a View
Pre-filtering limits a View to the entries that match a value or condition you set. Visitors see only those entries, and the Search Bar searches within them. A search value filters one embed of a View, and Advanced Filtering filters the View itself, on every page that shows it.
Filtering one embed with a search value #
The [gravityview] shortcode filters the View it embeds with search_field, the ID of the field to search, and search_value, the value to look for.
Each embed can have its own value, so one View can list the Alabama entries on one page and the Georgia entries on another. Add search_operator="is" when the field must hold exactly that value.
An embed searches only one field. To filter by several fields, use Advanced Filtering on the View itself.
For example, this embed lists the entries whose field 3 contains “Alabama”:
[gravityview id="12" search_field="3" search_value="Alabama"]
- In the block editor, select the GravityView View block.
- Open Extra Settings in the sidebar.
- Enter the field ID in Search Field and the value in Search Value.

Page builder widgets have the same settings, as Embedding Views in Divi, Beaver Builder, and Elementor shows.
When a merge tag in search_value comes out empty, such as {get:state} on a page address with no state parameter, the shortcode lists every entry. To list no entries in that case:
- In the shortcode, add
search_value_empty="none". - In the block, set When Search Value is empty to Show no entries.
To hide the View or show a message of your own when the value is missing, put the shortcode inside a [gvlogic] condition, as The {get} merge tag shows.
Note: Using the [gravityview] shortcode lists every parameter.
Filtering the View itself with Advanced Filtering #
Advanced Filtering adds conditions to the View, so they apply on every page that shows it, including the View’s own address. In the View editor, open the Filter & Sort tab of the Settings box, then click Add Condition under Advanced Filter.
Advanced Filtering is built into GravityView Pro. To turn it on or off, go to Plugins and click Features in the GravityView Pro row.
On a GravityView + Extensions (Legacy) license, Advanced Filtering is a separate plugin. About the “GravityView + Extensions (Legacy)” license shows how to install it.

The OR and AND buttons at the top of a group decide whether an entry has to match one of the group’s conditions or all of them. The toggle between two groups does the same for the groups.
A search value on an embed adds to these conditions. For example, when an embed has search_value="Alabama", it lists the Alabama entries that also pass the View’s conditions.
To let visitors click from an entry to the related entries in another View, use Connected Views.
Note: To have a View start filtered while letting visitors change or clear the filter in the Search Bar, give a search field a default value. Setting a default value in Configuring the Search Bar widget explains how.
Leaving one value out #
To list every entry except those with one value, such as every member outside Norway, compare with isnot:
[gravityview id="12" search_field="3" search_value="Norway" search_operator="isnot"]In the View block and in page builder widgets, choose Is Not as the Search Operator. The whole value is compared, so write it the way your entries store it: this embed leaves out Norway and keeps an entry that stores Norge.
Entries with nothing in the field are listed too. To leave them out as well, use Advanced Filtering with two conditions on the field: is not with the value, and is not empty.

For the country of an Address field, add .6 to the field’s ID, as in search_field="4.6". With the Address field’s own ID, GravityView compares the city too, so a member in Norway, Maine, is left out as well.
Visitors can leave a value out from the Search Bar too. A search for -Norway in a Search Everything field lists the entries that don’t contain Norway in any field, including fields the View doesn’t show.
A Danish member whose favorite resort is “Hemsedal, Norway” is left out as well. To check only the fields the View shows, turn on Search in visible fields only on the View Settings tab. The minus sign is one of GravityView’s search modifiers.