Custom meta fields
Overview
Beyond taxonomies, WPEnhanced Ajax Filter Blocks can filter by custom meta keys stored in post_meta. Use this for numeric ranges (year, square feet, rating), select-like values, or text fields exposed as filter controls.
Free plugin: meta key filters
In a Filter Posts Item block:
-
Set Filter source to Custom meta (or Meta key, depending on block label).
-
Enter the Meta key exactly as stored (e.g.
year_built,bedrooms,_custom_rating). -
Choose a Control type:
- Select / Radio / Checkbox — Discrete values
- Range — Numeric min/max (years, price-like custom values)
- Search — Text meta matching (when supported for your field type)
-
Set a clear Label for visitors.
The meta key must match what your theme, ACF, or custom code writes to the database. A typo in the key produces empty options or no filtering effect.
Where meta values come from
Filter options are built from values present in published posts in the Archive Loop's post type (subject to query scope). If only some posts have the meta key, counts reflect that subset.
For empty or missing options, see Empty options or counts.
ACF and custom field plugins
Free plugin
Enter the ACF field name as the meta key when ACF stores values in standard post meta (most field types do).
Pro: ACF field picker
WPEnhanced Ajax Filter Blocks Pro adds an ACF field picker in the block editor so you select fields visually instead of typing meta keys. Pro also supports ACF Map radius filtering. See ACF fields and map (Pro).
Numeric and range meta
For numeric meta (bedrooms, year, rating):
- Use a Range control with appropriate min, max, and step
- Or use Select with distinct values if the dataset is small
Test boundary values (min and max in your catalog) on staging.
Combining meta with taxonomies
Place meta filter items alongside taxonomy items in the same Filter Posts block. Visitors can filter e.g. Location (taxonomy) and Bedrooms (meta) together; the loop applies combined criteria via AJAX.
Developer customization
PHP filters can adjust meta query behavior for advanced cases. See PHP hooks.
What's next
- Custom post types — CPT setup with taxonomies and meta
- ACF fields and map (Pro) — Visual ACF picker and map radius
- Filter sources and control types — All filter sources