Viewing 5 replies - 1 through 5 (of 5 total)
  • missveronica

    (@missveronicatv)

    @peace808

    $imgURL is the URL to the UM uploads folder.
    Ask ACF Plugin support how you can get an ACF Image URL.

    Thread Starter peace808

    (@peace808)

    The acf image url works in other parts of the site like this:

    $prof_user_id = um_profile_id();
    $company_logo = get_field(‘company_logo’, ‘user_’. $prof_user_id );

    but this won’t work if I try replacing $key = ‘um_logo’; with:

    // Enter the field meta_key here:
    	$key =  get_field('company_logo', 'user_'. $prof_user_id );
    
    	$field = UM()->fields()->get_field( $key );
    	if ( $field && $field['type'] === 'image' ) {
    		$value = UM()->fields()->field_value( $key );
    		if ( $value ) {
    			$imgURL = UM()->uploader()->get_upload_user_base_url( $user_id ) . '/' . $value;
    			$data_array[$key] = [
    				'url'	 => $imgURL,
    				'html' => '<img src="' . esc_url( $imgURL ) . '" alt="' . esc_attr( $field['label'] ) . '"/>'
    			];
    		}
    	}
    Thread Starter peace808

    (@peace808)

    Does anyone know where this location is being referred to?

    the variable “user” in the member directory

    Does it mean the extra user information below tagline, found in the Member directory settings?

    Plugin Support andrewshu

    (@andrewshu)

    Hello @peace808

    Sorry for the late answer. Have you solved this problem?
    Please let me know if you need our help.

    Thank you.

    Plugin Support andrewshu

    (@andrewshu)

    Hi @peace808

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Unabled to get acf image in to profile card on Member grid’ is closed to new replies.