Skip Navigation

[Gelöst] Custom user fields not available in Views

This support ticket is created vor 3 Jahren, 4 Monaten. There's a good chance that you are reading advice that it now obsolete.

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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9: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: Africa/Casablanca (GMT+01:00)

Dieses Thema enthält 6 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von marcialB vor 3 Jahren, 3 Monaten.

Assistiert von: Jamal.

Author
Artikel
#2141793

Hi there

I want to show a list of all registered users. We use a membership plugin to add custom user fields. We registered those fields in toolset. I can correctly use those fields in the sorting options and in the query filter of a view. But I can't select the fields for the view itself. They are completely missing from the available fields when clicking the "fields and views" button.

How can I fix this?

Thanks for your help!

#2141953

Hello and thank you for contacting Toolset support.

I checked this on a clean install and I can confirm that 3rd party plugins' custom user fields do not appear on the list of fields from views even if we manage them with Toolset.

However, you can still display the field using the wpv-user shortcode. You will need to use the field meta_key. For an "additional-text" meta_key, the shortcode would be as follow. Check this screenshot versteckter Link

[wpv-user field="additional-text"]

I am escalating this issue to our 2nd Tier for another evaluation before escalating it to the developers. I would like to add that because we have a workaround, this may take some time before it gets fixed.

I hope this helps. Let me know if you have any questions.

#2141957

Hello again, our 2nd Tier confirms that this feature is not supported. We only support displaying 3rd party fields for posts, not for users or terms. And we do offer a button to scan for the fields in the UI. Check this screenshot versteckter Link

This being said, you will have to manually add the shortcode and the meta_key for the user fields in order to be able to display them.

If you think that this should be added to Toolset, please suggest it on this form https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

#2142023

Hi Jamal

Thanks a lot for your feedback. Using this shortcode works fine for me:

[wpv-user field="my-custom-user-field"]

At one point I have to use a condition to check if a field is emtpy or not (and only display it when there is a value). How would that work in this case? Changing the field name in the standard condition shortcode doesn't seem to do the trick and placing the shortcode from above into the condition shortcode doesn't seem to work either.

[wpv-conditional if="( $(wpcf-some-field-name) ne '' )"][/wpv-conditional]

Thanks for your help!

#2142025

Hi Jamal

Thanks a lot for your feedback. Using this shortcode works fine for me:

[wpv-user field="my-custom-user-field"]

At one point I have to use a condition to check if a field is emtpy or not (and only display it when there is a value). How would that work in this case? Changing the field name in the standard condition shortcode doesn't seem to do the trick and placing the shortcode from above into the condition shortcode doesn't seem to work either.

[wpv-conditional if="( $(wpcf-some-field-name) ne '' )"][/wpv-conditional]

Thanks for your help!

#2142081

The way you wrote the condition will not work for user fields, it will only work for post fields. However, using the shortcode inside the condition should work. You just need to register the wpv-user shortcode in Toolset->Settings->Frontend content->3rd party shortcodes. Check this article https://toolset.com/course-lesson/using-toolset-conditional-block/#checking-for-shortcodes-values

#2143501

Hi Jamal

I added the shortcode in the settings and was able to get the condition to work.

[wpv-conditional if="( '[wpv-user field='my-custom-field']' ne '' )"]

My issue is resolved now. Thank you!