• Resolved vialpm

    (@vialpm)


    Hello!
    Sorry for my bad english and thx for this plugin.
    I have create à taxonomie “domaine”.
    Users can edit their profile from Front end. Thwx for multiple functions :

    $user_taxonomie = new LH_User_Taxonomies_plugin;$user_taxonomie->save_profile($id_user);

    I create a search form for user into front-end. So i used get_users function width a lot of meta_query. It is possible to add something like ‘tax_query’ parameter to search item width one or more taxonomy ?

    thx
    PM

    https://wordpress.org/plugins/lh-user-taxonomies/

Viewing 1 replies (of 1 total)
  • Plugin Author shawfactor

    (@shawfactor)

    something like this would work:

    get the term in the user taxonomy:

    $term = get_term_by(‘slug’, ‘termsearch’, ‘taxonomy_name’);

    get the ids of the users who have that term

    $new_ids = get_objects_in_term($term->term_id, ‘taxonomy_name’);

    then use include to amend WP_User_Query to only query users with those ids

    Pete

Viewing 1 replies (of 1 total)

The topic ‘get_user with taxonomie’ is closed to new replies.