Title: Row Filtering
Author: Tobias Bäthge
Published: December 1, 2022
Last modified: September 15, 2025

---

Show only table rows that contain defined keywords or filter terms.

# Row Filtering

For sites that need to show many “small” tables with the same structure, e.g. entries
from an inventory database, it can be beneficial to keep all rows in one “big” table,
to simplify maintaining and editing the data.

## Feature description

While manually hiding rows, even with configuration parameters, allows showign only
a subset of all table rows, this approach can be cumbersome, as the numbers of the
table rows need to remain the same. If a row would move, e.g. because more are inserted
in a table, this will cause a lot of extra work.

Therefore, an approach similar to a database select query can help, so that only
rows with a certain keyword in a column are shown, instead of the full table. That’s
the use case for which the Row Filtering feature module can be used.

[Use this feature with a TablePress Premium plan today](https://tablepress.org/pricing/?output_format=md)

### Basic example

Imagine having a long table, e.g. a contacts list, with names, birthdays, companies,
etc. of many people. The Row Filtering module allows to show only a subset of those
people, here e.g. those from a specific company:

  |  Last Name | First Name | Birthday | Company | Phone | ZIP code | Country | Balance | Points | Rating |  
   |  Valenzuela | Lunea | 01/09/1966 | Cisco | 970-8655 | 51606 | Germany | $74.07 | 7 | 3.7 |  
 |  Moran | August | 07/04/1986 | Cisco | 651-1214 | 60737 | India | $22.64 | 1 | 7.5 |  
 |  Buckley | Stone | 09/11/1980 | Cisco | 422-7998 | 74057 | United States | $30.01 | 2 | 7.9 |

### Logic operators

The example above shows the filtering for a single filter term (a single company).
Using logic operators, `||` (for “or”) and `&&` (for “and”), it is possible to search
for multiple filter terms. This example uses the `||` operator to show contacts 
from two different companies:

  |  Last Name | First Name | Birthday | Company | Phone | ZIP code | Country | Balance | Points | Rating |  
   |  Cain | Lawrence | 05/16/1994 | IBM | 701-3108 | 98004 | United States | $54.81 | 5 | 2.5 |  
 |  Valenzuela | Lunea | 01/09/1966 | Cisco | 970-8655 | 51606 | Germany | $74.07 | 7 | 3.7 |  
 |  Logan | Shay | 09/13/1968 | IBM | 687-6482 | 03023 | United States | $46.39 | 8 | 7.6 |  
 |  Moran | August | 07/04/1986 | Cisco | 651-1214 | 60737 | India | $22.64 | 1 | 7.5 |  
 |  Buckley | Stone | 09/11/1980 | Cisco | 422-7998 | 74057 | United States | $30.01 | 2 | 7.9 |

Similarly, this example shows a table that uses the `&&` operator to show contacts
from a certain country and company:

  |  Last Name | First Name | Birthday | Company | Phone | ZIP code | Country | Balance | Points | Rating |  
   |  Valenzuela | Lunea | 01/09/1966 | Cisco | 970-8655 | 51606 | Germany | $74.07 | 7 | 3.7 |

**Important note**: For technical reasons, mixing the logic operators in the same
table is not possible!

### Additional settings

The filtering of rows can be further controlled using additional settings:

 * It is possible to specify which columns should be searched for the filter terms.
   By default, all columns are searched.
 * It is possible to select case-sensitive filtering. By default, case sensitivity
   does not matter, so that both upper- and lower-case matches would be found.
 * it is possible to turn on “Full cell matching”. The default behavior of the Row
   Filtering is to search for the filter terms anywhere in the cells. This could
   mean that e.g. the word `car` is found in a cell with the text `shopping cart`.
   Therefore, for some applications, it might make sense to only search the full
   cell content for matches.
 * In addition, it is possible to invert the “show matching rows” behavior into 
   a “hide matching rows” behavior. This will result in the table only showing those
   rows that do not fulfill the filtering condition.

### Complex logic expressions

In addition to simple strings that are searched and highlighted, it is possible 
to use complex logic expressions, like

    ```language-plaintext
    parse_date( row[2] ) > timestamp( "today - 30 days" )Code language: plaintext (plaintext)
    ```

to use the table cell data in more sophisticated ways. This is almost like a small
[programming language](https://symfony.com/doc/current/reference/formats/expression_language.html)
allowing the filtering to be based on comparisons or calculations.

## Usage instructions

To use these features with your tables, activate the “Row Filtering” feature module
on the “Modules” screen of TablePress Pro or TablePress Max. Then, configure the
desired options in the “Row Filtering” section of the “Settings” sidebar of the 
table’s “TablePress table” block when editing the post or page with the table, or
use the configuration parameters from below.

![The available settings for the Row Filtering module in the "Settings" sidebar 
of the "TablePress table" block.](https://tablepress.org/wp-content/uploads/2025/
09/row-filtering-block.png)

The available settings for the Row Filtering module in the “Settings” sidebar of
the “TablePress table” block.

## Configuration parameters

To configure this module’s features, you can also use these [configuration parameters](https://tablepress.org/faq/configuration-parameter-reference/)
in the “TablePress Table” [block](https://tablepress.org/faq/documentation-tablepress-table-block/),
the Elementor widget, or in the [Shortcode](https://tablepress.org/faq/documentation-shortcode-table/)
that you are using to embed the table:

  |  Module | Slug |  | Configuration parameter | Name | Description | Type | Default value |  
   |  Row Filtering | row-filtering |  | filter | Row Filtering Term | The table will show only rows that contain this filter term. You can combine multiple filter terms with an AND or OR operator, e.g. “term1&&term2” or “term1||term2”. | string | `""` (empty string) |  
 |  Row Filtering | row-filtering |  | filter_case_sensitive | Row Filtering Case-sensitive matching | Whether the case sensitivity of the filter term has to match the content in the cell. | boolean (`true` or `false`) | `false` |  
 |  Row Filtering | row-filtering |  | filter_columns | Row Filtering Filter columns | The columns which should be searched for the filter terms. | string | `""` (empty string) // “” equates to ‘all’. |  
 |  Row Filtering | row-filtering |  | filter_expression | Row Filtering Expression | A [logic expression](https://tablepress.org/modules/row-filtering/?output_format=md#logic-expressions) for complex Row Filtering. | string | `""` (empty string) |  
 |  Row Filtering | row-filtering |  | filter_full_cell_match | Row Filtering Full cell matching | Whether the full cell content has to match the filter term. | boolean (`true` or `false`) | `false` |  
 |  Row Filtering | row-filtering |  | filter_inverse | Row Filtering Invert filtering result | Whether rows with the filter term will be hidden and rows without the filter term will be shown. | boolean (`true` or `false`) | `false` |  
 |  Row Filtering | row-filtering |  | filter_url_parameter | Row Filtering URL parameter | Instead of, or in addition to, using a pre-defined filter term, a URL parameter like “table_filter” can be used. | string | `""` (empty string) |

The “Row Filtering” feature module is part of the [**TablePress Premium plans**](https://tablepress.org/pricing/?output_format=md).

**On this page**

 1. [Feature description](https://tablepress.org/modules/row-filtering/#feature-description)
 2.  a. [Basic example](https://tablepress.org/modules/row-filtering/#basic-example)
     b. [Logic operators](https://tablepress.org/modules/row-filtering/#logic-operators)
     c. [Additional settings](https://tablepress.org/modules/row-filtering/#additional-settings)
     d. [Complex logic expressions](https://tablepress.org/modules/row-filtering/#logic-expressions)
 3. [Usage instructions](https://tablepress.org/modules/row-filtering/#instructions)
 4. [Configuration parameters](https://tablepress.org/modules/row-filtering/#configuration)