• Pete

    (@perthmetro)


    I know of some plugins, code snippets and tutorials for custom taxonomies (tags) for user meta, BUT i haven’t found any for custom hierarchical taxonomies (categories).

    1. Can a user have custom hierarchical taxonomies?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator bcworkz

    (@bcworkz)

    Of course! When you register the custom taxonomy there is an argument you can use: 'hierarchical' => true,
    as part of the arguments array. It’s false by default. Setting it to true enables an extra field in the taxonomy admin screen for selecting a parent term. Of course the user must have the proper capability to edit taxonomy terms.

    Thread Starter Pete

    (@perthmetro)

    Thanks, yep I know about the 'hierarchical' => true, thing but none of the custom taxonomy ui plugins allow me to assign the CT to the user, only posts, media etc.

    Moderator bcworkz

    (@bcworkz)

    Oh! I see now, no, you cannot directly associate taxonomies with user objects. I knew you were too knowledgeable to ask what I thought you were asking.

    Perhaps associate a post type to users somehow, then attach taxonomies to that? Sort of like images and attachments. I’d be surprised if any plugin would let you do this, but it seems feasible as a custom coded solution.

    Thread Starter Pete

    (@perthmetro)

    Yup, that what I was thinking… using a single CPT as the user profile and normal posts as their postings, that way I can search users according to all different CTs.

    Thread Starter Pete

    (@perthmetro)

    This is the only plugin i’ve found that comes close, except it’s not hierarchical…
    https://www.ads-software.com/plugins/user-tags/

    Thread Starter Pete

    (@perthmetro)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wp custom hierarchical taxonomies for user fields’ is closed to new replies.