Tell us what you are trying to do? I'm trying to show a list of all members that can then be searched by the various fields displayed.
I created the CPT 'Members' as a way to manipulate the user data, and automatically created a Member post when a user was created (the user being the author of the post).
Almost all fields are custom user fields, and I can access these on the Loop editor, but I cant access them when creating a custom search filter.
For example, one of the custom user fields is 'home phone' (wpcf-home-phone). I would like a text search box at the top of the view where a user can input a phone number (or part of one).
I can add the field wpcf-home-phone to the loop but it doesn't show in the custom search filter available fields. If I swap post view for user view, I can still see the field, but then cant add a custom search.
Is there any documentation that you are following? Many previous support questions but none that Iv'e found the answer.
Is there a similar example that we can see? Here's a similar view I created for Members Cars which was simpler as I didnt require any user fields to be involved - hidden link - You'll be able to see the various search filters.
What is the link to your site? hidden link
Apologies in advance as I've asked you quite a few questions recently but this one really has me stumped.
Kind regards
James
Dear James,
I assume we are talking about this case:
- A custom post type "Members", each "Member" post author is different WordPress user
- A post view, query "Member" posts, you are going to filter the result by custom user fields.
If it is, it is not possible within Toolset Views/Blocks plugin, since Toolset Views/Blocks plugin is using WordPress class WP_Query to query posts, see WP document:
https://developer.wordpress.org/reference/classes/wp_query/
There isn't such kind of option to filter result by user fields.
I suggest you try to move the custom user fields as custom post fields of post type "Members".
Hi Lou,
Many thanks for your quick response.
Ok, I'm happy to do that. If I create matching fields in the Member post type, whats the best way of moving all date over? Export and reimport? or is there a more simple method?
Kind regards
James
Many thanks Luo, I've reimported the data to fields in the Members post type now. Issue resolved.
Kind regards
James