• Resolved Sultan Mahmud

    (@sultanb24)


    Hi, Can i search user using this plugin and display user info ( like profile picture, first name, last name, about, call to action button) in frontend?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hello,

    User search available only with pro plugin version.
    Also you can customize the users search output as you want with the special code snippets. Please read more info here.

    Regards

    Thread Starter Sultan Mahmud

    (@sultanb24)

    Now, i’m explain you what i want.
    Suppose I have 3 groups of customer in woocommerce like 1) General customer, 2) craftsman and 3) dealer
    In this case, I want to dealer has the option of creating a profile in the online store so that general customers and craftsman can find him on the dealer search page.

    also The craftsman has the option of creating a profile in the online store so that general customers can find him on a crafts man search page

    NB: profile should be general profile like name, email, website and about herself (Bio)

    search page and profile page demo https://paste.pics/AMGRG

    Is it possible do using pro version?

    • This reply was modified 4 years, 4 months ago by Sultan Mahmud.
    Plugin Author ILLID

    (@mihail-barinov)

    So first – to display inside search results users info like name, email, website and bio please use following code snippet

    add_filter( 'aws_search_users_results', 'my_aws_search_users_results', 10, 3 );
    function my_aws_search_users_results( $results, $roles, $search_query ) {
        if ( $results ) {
            foreach( $results as $user_id => $user ) {
                $excerpt = '';
                $user_info = get_userdata($user_id);
                $userdata = get_user_meta( $user_id );
                if ( $userdata && isset( $userdata['description'] ) ) {
                    $excerpt .= $userdata['description'][0];
                }
                if ( $user_info && $user_info->user_email ) {
                    $excerpt .= '<br>Email - ' . $user_info->user_email;
                }
                if ( $user_info && $user_info->user_url ) {
                    $excerpt .= '<br>Website - ' . $user_info->user_url;
                }
                $results[$user_id][0]['excerpt'] = $excerpt;
            }
        }
        return $results;
    }

    About searching for different user roles – this can be done in the following way:

    Create different search form instances with different options for user roles search. One – for searching for dealers. Second – for craftsmans search. Than add both of this two search forms on the needed places of your site.

    Thread Starter Sultan Mahmud

    (@sultanb24)

    Hey, Thanks for you explanation.
    Can you sent me a frontend demo profile link (include user avatar, name, email, website and bio).So that, I can decide use pro version.

    Plugin Author ILLID

    (@mihail-barinov)

    You can look on demo here – https://demo.wooitems.com/new/search-form/ under Users search.
    Search for admin or test.

    Thread Starter Sultan Mahmud

    (@sultanb24)

    I saw your demo. looks good.
    https://paste.pics/AO2XA
    but when i click user it’s show page not found that’s not good.
    https://paste.pics/AO2YJ
    is it possible open single page for user after click user?

    check it here single page look like
    https://paste.pics/AMGRG

    Plugin Author ILLID

    (@mihail-barinov)

    Looks like this test author doesn;t has any assigned posts/products so thats why you see this empty page. I add one post to it and now archive page works fine.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Display user search page’ is closed to new replies.