• I have a custom taxanomy made with ACF called “Departments”. And I need the selected department to show in the [user] shortcode. Not sure how to do this.

    My taxanomy name is departments
    If I try any of these

    [user array=departments]
    [user field=departments] 
    [user taxonomy=departments]
    [user user-field=departments]

    It just outputs user’s name except for [user field=departments] which outputs number 73.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    I think you can do it with the [pass] shortcode.

    Peter

    Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    Yes, I believe this is possible with [pass] and [taxonomy].

    [pass user_field=departments]
    
    Department: [taxonomy department term={USER_FIELD} field=link]
    
    [/pass]

    If the user field departments can contain more than one term (a user can belong to more than one department), you can use the [for] shortcode to loop through each term.

    [pass user_field=departments]
    [for each=department term={USER_FIELD}]
    
    Department: [each link]
    
    [/for]
    [/pass]
    
    • This reply was modified 6 years, 5 months ago by Eliot Akira.
    • This reply was modified 6 years, 5 months ago by Eliot Akira.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to create user shortcode with taxanomy’ is closed to new replies.