Skip to content

Post Relation Search

The Post Relation Search function adds a searchable dropdown to post relation filters in Voxel search forms. Instead of scrolling through long lists, users can type to quickly find and select related posts.

Overview

When using post relation filters in search forms, the default behavior requires users to scroll through all available posts. This function enhances that experience by adding AJAX-powered search functionality, making it much easier to find specific posts in large datasets.

Key Features

  • Real-time AJAX search within post relation dropdowns
  • Works with all post relation filters in search forms
  • Searches post titles and user display names
  • Supports pagination with “load more” functionality
  • Respects post type and status settings
  • Scope support: any post or current user’s posts
  • Works in Elementor preview mode

Setup Instructions

Step 1: Enable the Function

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

Step 2: Use It

Once enabled, the search functionality automatically activates on all post relation filters in Voxel search forms. No additional configuration is needed.

How It Works

  1. User clicks on a post relation filter in a search form
  2. A search input appears at the top of the dropdown
  3. User types to search for specific posts
  4. Results update in real-time via AJAX
  5. User selects the desired post to filter by

Use Cases

Large Directories

When you have hundreds or thousands of posts to filter by, search makes it much faster to find the specific one you need.

Let users search for a specific business when filtering events, products, or services by their associated business.

User Profile Filtering

When filtering by user profiles, search by name makes it easy to find specific people.

Location-Based Filters

When posts are related to locations, quickly search for specific places instead of scrolling through long lists.

Troubleshooting

Search Not Appearing

  • Verify the function is enabled in Voxel Toolkit
  • Check that the filter is a post relations type filter
  • Clear any caching plugins
  • Check browser console for JavaScript errors

Search Returns No Results

  • Ensure posts exist with matching titles
  • Check that related posts are published
  • Verify the search term is spelled correctly
  • MySQL fulltext search requires at least 3-4 characters

Slow Search Performance

  • Large databases may benefit from database indexing
  • Consider server performance and hosting capabilities
  • Check for database optimization opportunities

Built by Code Wattz.