• Hi,

    on the members-grid.php file I can see this:

    if ( $profile_photo ) { ?>
    <div class="um-member-photo radius-<?php echo esc_attr( UM()->options()->get( 'profile_photocorner' ) ); ?>">
    <a href="<code>user.profile_url</code>" title="<# if ( user.display_name ) { #><code>user.display_name</code><# } #>">
    <code>user.avatar</code>
    <?php do_action( 'um_members_in_profile_photo_tmpl', $args ); ?>
    </a>
    </div>
    <?php } ?>

    but instead of using the user.avatar I want to use company_logo

    I’ve got this elsewhere:

    $um_company_logo = um_user(‘company_logo’);

    but I cannot work out how to use the company_logo field instead of the avatar.

    Can anyone help please?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @tridentmarketing

    You can try to use this code snippet:

    add_filter( 'um_ajax_get_members_data', 'um_ajax_get_members_data_company_logo', 10, 3 );
    
    function um_ajax_get_members_data_company_logo( $data_array, $user_id, $directory_data ) {
    
        if ( isset( $data_array['avatar'] )) {
            $data_array['avatar'] = wp_kses( '<img src="' . site_url() . '/' . um_user( 'company_logo' ) . '" width="300" height="300">', UM()->get_allowed_html( 'templates' ) );
        }
        return $data_array;
    }

    Install by adding the code snippet to your active theme’s functions.php file
    or use the “Code Snippets” Plugin

    https://www.ads-software.com/plugins/code-snippets/

    • This reply was modified 4 months, 2 weeks ago by missveronica.
    • This reply was modified 4 months, 2 weeks ago by missveronica.
    Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Hi @tridentmarketing

    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 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.