Tagged: Staff list
- This topic has 10 replies, 2 voices, and was last updated 6 years, 6 months ago by WCFM Forum.
- AuthorPosts
- June 21, 2018 at 8:42 pm #25219rjbigueParticipant
Is there a way for show a list of the Staff in a shop?
Example, user visits shop page, user can see Shop owner: Billy, Shop manager: Emily, Shop staff: Jim, Doug, Tom, Sue, KellyShow their username and link to their profile? But only members of a specific vendor shop. Not a full site members listing.
- June 22, 2018 at 6:06 am #25231WCFM ForumMember
Hi,
Thanks for get in touch with us.
Off course possible to display such list.
Can you show me screenshot of such a place in your site where you want to have such a list?
Thank You
- June 24, 2018 at 5:56 am #25331WCFM ForumMember
Hi,
Great, understand the concept.
Now, tell me two more things –
1. Which multi-vendor plugin you are using ?
2. Are you using any profile builder plugin? Where staff will be linked?Thank You
- June 24, 2018 at 3:06 pm #25342WCFM ForumMember
Hi,
You have written that – “have the list of staff there so users can click to view their profile.”
Now which profile you want to refer here as WC Marketplace or WCfM, none any such front-end profile page for Staffs or any other users.
You may have such profile page using plugin like BuddyPress.
Thank You
- June 26, 2018 at 6:02 am #25421WCFM ForumMember
Hi,
Thanks for all the details.
Can you please add this code to your site –
function wcmp_vendor_store_header_custom_hide_email( $hide ) { return 'Enable'; } add_filter('wcmp_vendor_store_header_hide_store_email', 'wcmp_vendor_store_header_custom_hide_email' ); function wcmp_vendor_staff_list( $vendor_id ) { global $WCFM; $staff_user_role = apply_filters( 'wcfm_staff_user_role', 'shop_staff' ); $args = array( 'role__in' => array( $staff_user_role ), 'orderby' => 'ID', 'order' => 'ASC', 'offset' => 0, 'number' => -1, 'meta_key' => '_wcfm_vendor', 'meta_value' => $vendor_id, 'count_total' => false ); $wcfm_shop_staffs_array = get_users( $args ); $shop_staff_html = ''; if(!empty($wcfm_shop_staffs_array)) { $shop_staff_html .= '<div class="wcmp_vendor_staff_list"><i class="fa fa-user"></i>'; $is_first = true; foreach( $wcfm_shop_staffs_array as $wcfm_shop_staffs_single ) { if( !$is_first ) $shop_staff_html .= ', '; $shop_staff_html .= $wcfm_shop_staffs_single->first_name . ' ' . $wcfm_shop_staffs_single->last_name; $is_first = false; } $shop_staff_html .= '</div>'; } echo $shop_staff_html; } add_action( 'after_wcmp_vendor_information', 'wcmp_vendor_staff_list', 15 );
This will hide vendor email display and show list of vendor’s staffs.
So for this test vendor it will show “Richard Bigue”.
Now, you have asked me this – “Name/s Have each of those names a link to that persons personal profile.”
This “personal profile” is not yet clear to me. Kindly know me where should I link “Richard Bigue”? Give me that URL.
Thank You
- June 27, 2018 at 1:32 am #25518rjbigueParticipant
I edited the segment $wcfm_shop_staffs_single->first_name . ‘ ‘ . $wcfm_shop_staffs_single->last_name; to be $wcfm_shop_staffs_single->user_nicename; to get their username instead of their real name. The list works perfectly!
As for the profile link I was trying to refer to the dashboard the user has when they click “my account” However, given the way the messenger system works I do not need that link so this request is completed.
Thank you very much.
- June 27, 2018 at 6:27 am #25523WCFM ForumMember
Hi,
That’s fine.
Profile Link – Please give a real URL for a user.
Thank You
- AuthorPosts
- The topic ‘Staff list’ is closed to new replies.