Skip to content

Enhanced Post Relation

The Enhanced Post Relation function lets you customize how posts appear in Post Relation field drop-down. Instead of showing just the title, display additional information like location, price, or membership level.

Overview

When users select related posts in a Post Relation field, they see a dropdown list of options. By default, only the post title is shown. This function allows you to add context using Voxel dynamic tags, making it easier for users to identify the right post.

Key Features

  • Configure display templates per post type
  • Use any dynamic tag or modifier
  • Native dynamic tag picker interface
  • Post-type-specific field suggestions
  • Supports Toolkit’s custom dynamic tags

Setup Instructions

Step 1: Enable the Function

  1. Navigate to Voxel Toolkit → Functions in your WordPress admin
  2. Find Enhanced Post Relation in the list
  3. Toggle the switch to enable the function
  4. Click Save Changes

Step 2: Configure Display Templates

  1. Click Configure next to Enhanced Post Relation
  2. Select a post type that appears in Post Relation dropdowns
  3. Enter a display template using dynamic tags
  4. Click Save Changes

Dynamic Tag Picker

The settings panel includes a native dynamic tag picker that shows:

  • All available fields for the selected post type
  • Field properties (e.g., location.city, location.lat)
  • Available modifiers
  • Toolkit’s custom dynamic tags

Click a field to insert its dynamic tag at your cursor position.

Supported Modifiers

You can use any Voxel modifier in your templates:

Use Cases

Property Listings

When selecting a related property, show the location to help identify the right one.

User Profiles

When linking to profiles, show the membership level or verification status.

Products

When selecting related products, show the price or category.

Events

When selecting events, show the date alongside the event name.

Troubleshooting

Template Not Showing

  • Check that the function is enabled
  • Verify you’ve configured the correct post type
  • Ensure the Post Relation field references that post type
  • Clear any caching and refresh

Dynamic Tags Not Rendering

  • Verify the field exists on the post type
  • Check the syntax of your dynamic tag
  • Ensure the post has data in that field
  • Test with a simple tag like @post(title) first

Built by Code Wattz.