Filter Exported WordPress Data
You configure filters in the Add Filtering Options section, which is available when creating and editing exports. Each filter consists of an element, a rule, and a value.
For example, if you want to export all WooCommerce products that cost less than $10, select Price as the element, less than for the rule, and 10 as the value.
With this type of filter, you can selectively export:
- Every WooCommerce order over $100
- Users who have registered in the last week
- All of the green shirts in your WooCommerce store
- Every page created by a certain user
- All of the posts written in 2014
Step 1: Select an Element to Filter Export Data
Select the element for your filter. Available elements will change when you export different types of data. You can select any data associated with the records you are exporting, such as:
- Date
- Title
- Price
- Order Total
- Address
- Author
- Categories and tags
- Custom fields
- Any exportable data
Step 2: Add a Filter Rule
Select the comparison rule for your filter. You can use any of the following rules, depending on what the selected element allows:
- equals
- doesn't equal
- greater than
- equal to or greater than
- less than
- equal to or less than
- contains
- doesn't contain
- is empty
- is not empty
Step 3: Enter a Filter Value
Input the value for your filter. You should input values that follow the same format as the element selected in Step 1.
Some rules may not need a value, such as the is empty rule.
Once you're finished, click Add Rule to apply the new filter.
Export WordPress to any CSV, XML, or Excel
- Import back to WordPress
- Any theme or plugin
- Custom fields
- Zapier integration
- Woo, ACF, Meta Box, JetEngine
Adding Multiple Rules when Filtering Exported Data
You can add as many filter rules as required. Use the AND or OR operators to specify how rules should interact with each other. After that, only records matching all your specified rules will be exported.
When your export runs again, WP All Export will rebuild your export file based on your filter rules.
Filter Export Data Advanced Topics
Filtering By Date and Relative Dates
When exporting data that contains dates, you can use relative dates.
For example, to export a subset of your WooCommerce orders, first expand the Add Filtering Options panel near the bottom of the New Export screen.
Then, set your filter using the following:
Element = Order Date
Rule = equal to or newer than
Value = 01/01/2018
This is equivalent to saying, “Export WooCommerce orders with an order date equal to or newer than January 01, 2018.” The format to use is MM/DD/YYYY. For example, 12/31/2022 would be December 31st, 2022.
You can also combine multiple filter rules. For example, to export only orders from last month, you can use these rules:
Since these are relative date rules, you won't have to update them monthly. Learn about the syntax for date filters here: https://www.php.net/manual/en/datetime.formats.php#datetime.formats.relative.
Filter Export Data with Multiple Values (Taxonomies and Attributes)
When the element selected to filter is a taxonomy or an attribute, the only two rules available are In and Not In. If you're filtering by Product categories, you would have In Product Cat and Not In Product Cat available:
With such rules, you can provide multiple values separated by a comma.
For example, you can set up a filter to export only WooCommerce products that are in the categories Classic, Large, and Extra Large:
Filtering WooCommerce Product Export by Product Visibility (also known as Catalog Visibility)
The following instructions only apply when you export WooCommerce products via WP All Export.
While you see Shop and search results or Hidden when assigning the product's catalog visibility, the data stored by WooCommerce is a bit different than what you would expect.
To filter by the desired catalog visibility, a pair of filters must be assigned. Here's a list of the filters you would need to set up for each case:
Shop and search results:
- Product Visibility › Not In Product Visibility › exclude-from-search
- Product Visibility › Not In Product Visibility › exclude-from-catalog
Shop only:
- Product Visibility › In Product Visibility › exclude-from-search
- Product Visibility › Not In Product Visibility › exclude-from-catalog
Search results only:
- Product Visibility › In Product Visibility › exclude-from-catalog
- Product Visibility › Not In Product Visibility › exclude-from-search
Hidden:
- Product Visibility › In Product Visibility › exclude-from-search
- Product Visibility › In Product Visibility › exclude-from-catalog
Related Docs
Create more complex filters using WP_Query.
Integrate WP All Export with countless apps and services using Zapier.
Execute custom code to modify the export data on the fly.
Learn about WP All Export's API and hooks.