Skip Navigation

[Resolved] filterin map data from user record

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 1 voice.

Last updated by Minesh 1 month ago.

Assisted by: Minesh.

Author
Posts
#2817364

Hi we have a map showing locations of our chapters. The address data is pulled from the user record.

We'd like to be able to filter it by state, but when we try and create a filter we get a notice that filters can only be used with post data.

Is this possible to do with data from the user record somehow?

Thanks

#2817408

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Basically - you can build the custom search view where you can add the frontend search filters using custom fields, taxonomies for the post type (native or custom post type) view. You can not build custom searcch view with user or taxonomy view.

As a workaround, you may try to add a custom field to your post type and copy the value of the user field to this custom field and then use this field as frontend filter with your view. Does that makes sense?

#2817460

Minesh no im not sure what you mean here. Out view lists users and we build it from the user table. It shows their name and address. I guess the address fields are fields weve added. Does that make them custom fields and if so should we be able to filter on the state field

#2817548

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - thanks for clarifying that. If you view lists users the solution I shared will not work.

As I shared before you simply can not build custom search views that lists taxonomy and users.

The possible solution would be you should add a dummy post type for instance "Registered Users" and when a new user register on your site at the same time you will have a add one entry to this post type "Registered Users". You can say it will be 1:1 copy of your user data. So accordingly you can add custom fields to "Registered Users" post type. So if you have ten users the post type "Registred Users" should also have ten enntries.

Then later you can use "Registered Users" post type to build your custom search with all possible custom fields and taxonomies you assign to "Registered Users" post type.