Voxel Enhanced Post Relation Field
The {CODICTS} Voxel Enhanced Post Relation Field plugin enhances Voxel’s post relation field on create/edit post forms by adding customizable search filters to the relation field popup. Instead of scrolling through a basic list or relying on simple keyword search, users can filter related posts using the same powerful Voxel search filters available on your search form widgets — keywords, taxonomy terms, ranges, toggles, ordering, and more.
Installation & Activation
Start by downloading the plugin from the Downloads page on your dashboard on the CoDicts website.
After downloading, install and activate the plugin in WordPress by navigating to “Plugins” > “Add New” > “Upload Plugin” and selecting the downloaded zip file. Click “Install Now” and then “Activate”.
Once activated, navigate to “Enhanced Post Relation Field” in the WordPress admin sidebar to configure which filters appear on which post relation fields.
What This Plugin Solves
In Voxel, a post relation field lets one post type reference another — for example, a “Review” linking to a “Restaurant”, or an “Event” linking to a “Venue”. When a user creates or edits a post and clicks a relation field, Voxel shows a basic popup with limited search — typically just a keyword search or a flat list.
This works fine when you have a few dozen related posts, but becomes difficult when there are hundreds or thousands of options. This plugin replaces that basic popup with a full-featured search panel using the same Voxel filters your visitors use on your search pages.
Setting Up Filters
Step 1: Open the Settings Page
Navigate to “Enhanced Post Relation Field” in the WordPress admin sidebar.
Step 2: Enable a Post Type
The settings page shows all your Voxel post types that have at least one post relation field. Check “Enabled?” next to each post type where you want to enhance the relation field.
Step 3: Enable Specific Relation Fields
When you enable a post type, its relation fields appear below. Check “Enable?” next to each relation field you want to enhance.
Step 4: Choose Filters for Each Related Post Type
For each enabled relation field, you will see the related post type(s) it connects to. For each related post type, a multi-select list shows all available Voxel search filters. Select the filters you want to appear in the popup.
Hold Ctrl (or Cmd on Mac) to select multiple filters.
Step 5: Save Settings
Click “Submit” at the bottom of the page to save your configuration.
Tip: Start with just a few key filters (e.g., keywords and one or two taxonomy filters). You can always add more later. Too many filters can overwhelm the popup.
Available Filter Types
The following Voxel search filter types are available for use in the relation field popup:
| Filter Type | Description |
|---|---|
| Keywords | Text keyword search. |
| Taxonomy Terms | Category, tag, or custom taxonomy filters with hierarchy support. |
| Range | Numeric range sliders (e.g., price range). |
| Stepper | Numeric increment/decrement controls (e.g., number of rooms). |
| Switcher | On/off toggle switches (e.g., “Has parking”). |
| Availability | Date availability pickers. |
| Open Now | Business hours check toggle. |
| Ordering | Sort order selector (e.g., newest first, alphabetical). |
The following filter types are not supported in the popup context:
| Excluded Filter | Reason |
|---|---|
| Location | Map-based filters are too complex for the popup. |
| Date / Recurring Date | Date picker complexity. |
| Relations | Nested relations within a relation field are not supported. |
Using the Enhanced Relation Field
Once configured, the enhanced relation field works automatically on your Voxel create/edit post forms.
Step 1: Open a Create or Edit Post Form
Navigate to a page with a Voxel create-post form (or edit an existing post) that has an enabled relation field.
Step 2: Click the Relation Field
Instead of Voxel’s default popup, a custom popup opens with your configured search filters at the top and a results grid below.
Step 3: Filter and Search
Use the filters to narrow down results. The results update automatically as you change filters — no need to click a search button.
Step 4: Select Posts
Click on a result item to select it. The plugin automatically detects the relation type:
| Relation Type | Selection Behavior |
|---|---|
| has_one / belongs_to | Radio buttons — only one post can be selected at a time. |
| has_many / belongs_to_many | Checkboxes — multiple posts can be selected. |
Already-selected posts are pre-checked when the popup opens.
Step 5: Close the Popup
Click the close button or click outside the popup. Your selected posts now appear in the relation field on the form.
Tip: If the relation field accepts multiple post types (e.g., both “Venues” and “Restaurants”), a post type switcher appears at the top of the popup so you can switch between them.
Multi-Post-Type Relations
If a post relation field is configured to accept multiple post types (e.g., an “Event” can be linked to both “Venues” and “Restaurants”), the popup automatically shows a post type switcher at the top. Clicking a post type loads its configured filters and results.
Each related post type can have its own set of filters configured independently in the settings.
Companion Plugin: Post Relation Field Addon
This plugin is compatible with the {CODICTS} Voxel Post Relation Field Addon. When both plugins are active, search results in the popup can display custom labels instead of plain post titles.
For example, instead of just showing “Joe’s Pizza”, the result might display “Joe’s Pizza – Italian (New York)” using the addon’s label template syntax.
To use this feature, configure your custom label templates in the Post Relation Field Addon settings. The Enhanced Post Relation Field plugin will pick them up automatically.
Troubleshooting
“Voxel Theme Not Detected” Error
Ensure the Voxel Theme is installed and set as the active theme. If you are using a child theme, the parent theme must still be voxel.
Popup Does Not Open When Clicking a Relation Field
Check the following:
Is the post type enabled? Go to the plugin settings and verify the post type is checked as “Enabled”.
Is the specific relation field enabled? Make sure the individual relation field also has “Enable?” checked.
Are filters selected? At least one filter must be selected for the related post type. If no filters are configured, the plugin has nothing to display.
JavaScript errors? Check the browser console for errors that might prevent the popup from loading.
Search Filters Don’t Appear in the Popup
The filters are loaded via AJAX when the popup opens. Check your browser’s Network tab for the cveprf_load request and verify it returns successfully. Also make sure the Voxel search filters are properly configured on the related post type in Voxel’s post type settings — the plugin reads filters from Voxel’s configuration.
Search Returns No Results
Make sure published posts exist for the related post type. If the relation field’s allowed_authors setting is not set to “any”, the current user’s own posts may be excluded from results. Try the same filters on a regular Voxel search form to verify they return results there.
Selected Post Does Not Appear in the Relation Field
The plugin communicates with Voxel’s internal components to register the selection. If Voxel has been updated and its internal structure has changed, this connection may break. Check the browser console for JavaScript errors. If you see errors like “Cannot read property ‘selectPost’ of undefined”, check for a plugin update from CoDicts.
Popup Styling Looks Broken
Verify the popup CSS loaded successfully by checking the browser’s Network tab. The popup uses Voxel’s CSS variables for theming, so it should match your site’s design automatically. If styles appear broken, check for CSS conflicts with other plugins or custom CSS.
Conflicts After a Voxel Theme Update
This plugin relies on Voxel’s internal search components and Vue.js structure. After a major Voxel update, check for a plugin update from CoDicts. If the popup or search breaks, deactivate the plugin temporarily until a compatible version is released.
For further support, visit codicts.com or contact us at support@codicts.com.