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!
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 hidden 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.
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 hidden 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/
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!
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!
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
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!