Can you exclude users from user search?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Can you exclude users from user search?

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 7 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11067
    Valerie Robinson
    Valerie Robinson
    Participant

    Hi there–I have made a member search for my site that searches the wp users and displays woocommerce billing fields for results. However a few of my users don’t want to appear in the list. Is there a way to exclude individual users from showing?

    Thanks!

    #11074
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Valerie,

    I had to actually look up this one, because I thought it was already possible. Turns out I have forgotten completely to implement an exclusion field along with the actual exclusion code.

    Because it’s not implemented yet, the only solution is to use a custom code for that. Use this code in the functions.php file in your active theme directory (copy from line 3):

    You will have to change the $user_ids array to the user IDS you want to exclude. You can add as many as you want. I hope this helps!

    I will make sure to add the missing option for the upcoming release.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.