I'm setting up a view that will show custom fields from a taxonomy (term field). If they have not uploaded a headshot, I don't want it to output.
When I try to use the conditional output generator, the custom fields aren't showing up as an option.
The term field slug is termmeta='headshot-instructor' - what's my conditional shortcode?
(ie if it was a post custom field with the slug "head-shot" the code would be : [wpv-conditional if="( $(wpcf-head-shot) ne '' )"]
Something like this should work:
[wpv-conditional if="( '[wpv-taxonomy-field name="wpcf-a-term-field"]' ne '' )"]YES[/wpv-conditional]
Or also:
[wpv-conditional if="( '[types termmeta='a-term-field'][/types]' ne '' )"]YES[/wpv-conditional]
However, thank you for asking us this question, because it's not OK in my opinion that you have to guess.
It should be possible to create such conditionals with the GUI or at least have a DOC that elaborates on it.
Hence I'll escalate this as a usability issue and improvement to make.
You can either mark this ticket as resolved if above solution works for you, or keep it open so I can update you on the progress made.
It's by the way not the first time that this issue pops up, I see in the forum:
https://toolset.com/forums/topic/conditional-display-using-taxonomy-term-fields/
https://toolset.com/forums/topic/how-to-conditional-display-taxonomy-term-fields-in-taxonomy-archive/
Note that in the last above ticket Christian suggests what you tried initially, but for me, that did not work. So I don't think that is supported, instead you'll need to use either of my suggested approaches above.
I will also check if this is really not supported or just a BUG (the $(wpcf-etc) syntax)
Thanks again!