⚡45% off (includes upgrade) to lifetime deal (BLACKFRIDAY45), 30% off other plans (BLACKFRIDAY30)

Table of Contents

How to Search for Voxel Posts by Author

Table of Contents

As you may know, Voxel user filter does not allow users to select a list of authors from the frontend. It only displays posts based on the filter’s default value. In this article, I will guide you through a small trick to enable users to search for posts by author.

Step 1: Add a Post relation field – Profile to the post type

Go to WP backend > Post Type Settings > Fields and add a Post relation field – Profile to your post type

Step 2: Set up your advanced create post form

On the create post form, add default value for the post relation field you just created as Voxel dynamic tag: @user(profile.:id), then hide it on frontend

 

Note:

  • You need to enable the Advanced Create Post Widget addon of EA4V to use this feature
  • To ensure the author filter works correctly, you must use this form to create posts so that the post relation is automatically set up.

Step 3: Add a post relation filter for the post type

Step 4: Add the filter to your search form

Make sure you have activated the Advanced Search Form addon of EA4V to display the post relation filter.

So, we have created an author filter based on the profile. I hope you succeed in implementing it

  • Published on 05/22/2024
Picture of Huy Duc Nguyen

Huy Duc Nguyen

from Voxel-addons.com with ❤

0 comments

Get Subscribed Today!

  • Chat