Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › How to add image source into a custom field? › Reply To: How to add image source into a custom field?
April 1, 2021 at 11:39 am
#32499
Participant
Hello Ernest! I contacted YITH support about how to get avatar image from a Vendor from YITH Multivendor Store plugin.
Here is what they told me:
Hi Daniel,
thanks for contacting us. The plugin can use two type of avatar: Owner Avatar or Custom avatar and you can use this code to get it:
wp_get_attachment_image( $vendor->avatar, apply_filters( 'yith_wcmv_get_avatar_size', YITH_Vendors()->get_image_size( 'gravatar' ) ) );
OR
get_avatar( $vendor->owner, get_option( 'yith_vendors_gravatar_image_size', '62' ) );
If you need other kind of information about that feel free to contact me again.
Have a nice day
Andrea Grillo
Could you please help me to know how to “convert” this codes they gave me to a readable way for Ajax Searc Pro so it can get the Avatar Image please?
Thank you!