Appearance
Post Relation Search
Upgrades Voxel's "Post relation" search filter into a much more capable filter: type-to-search, opt-in multi-select with ANY/ALL matching, live result counts, dropdown ordering, scope, and per-widget curation.
Updated in 1.7.4
This function received a major upgrade. Existing filters keep their exact behavior — a searchable single-select dropdown — until you turn on the new options per filter in the post type editor.
Overview
Out of the box, Voxel's relation filter is a scroll-only, single-select list. With this function enabled, every relation filter gains AJAX type-to-search, and the post type editor gains new per-filter options for multi-select, matching behavior, ordering, live counts, and scope.
Key Features
- Type-to-search — AJAX search across post titles (and user display names for profiles)
- Multi-select — let users pick several related posts, shown as removable chips
- ANY / ALL matching — results relate to at least one selected post, or to every one
- Adaptive counts — each option shows how many results it would return under the current search; empty options hide
- Dropdown ordering — title A→Z / Z→A, newest, or oldest
- Scope — offer any published post, or only the current user's own posts
- Per-widget curation — per search form, hide specific posts or restrict the list to specific posts
- "Load more" pagination for long lists
Setup Instructions
Step 1: Enable the Function
- Navigate to Voxel Toolkit → Functions and enable Post Relation Search
- Type-to-search activates immediately on all existing relation filters — nothing else changes
Step 2: Turn On the New Options (per filter)
- Go to Voxel → Post Types → your post type → Filtering
- Open (or add) a Post relation filter
- Configure the new options:
| Option | Description | Default |
|---|---|---|
| Allow selecting multiple posts? | Turns the filter into a multi-select with chips | Off |
| Multiple selections match | ANY of the selected posts, or ALL of them | Any |
| Order dropdown posts by | Title A→Z / Z→A, newest, oldest | Title |
| Enable adaptive display? | Live result counts per option; zero-result options hide | Off |
| Scope | Any author's posts, or only the current user's | Any |
| Placeholder | Text shown in the empty filter | — |
Per-Widget Options (Elementor)
Each Search Form widget's relation filter also offers:
| Option | Description |
|---|---|
| Hide specific posts | Comma-separated post IDs excluded from this dropdown |
| Restrict to specific posts | The dropdown lists only these IDs |
| Show selected chips | Show removable chips for selections inside the popup |
Use Cases
Large Directories
Thousands of related posts stay usable — type a few letters instead of scrolling.
Multi-Venue Event Search
"Show events at any of these three venues" — or with ALL matching, posts related to every selected item.
Dashboards
Scope set to "current user" turns the filter into "filter by my own listings."
Curated Landing Pages
Restrict a page's filter to a handpicked set of featured partners.
Troubleshooting
Search returns nothing
- The typeahead uses a MySQL FULLTEXT index on post titles; Voxel normally creates it. If an admin notice reports a missing index, re-run Voxel's database setup
- MySQL fulltext search needs at least 3-4 characters
Multi-select isn't available
- Enable Allow selecting multiple posts? on the filter itself in the post type editor — it's off by default so existing filters don't change
Adaptive counts don't update
- Adaptive display is per filter — enable it in the filter's options
- Counts refresh after each search change; give slow hosts a moment
Options missing from the dropdown
- Check the widget's Restrict to specific posts / Hide specific posts settings
- With adaptive display on, options with zero results under the current search are hidden by design

