• Resolved mm7916mm7916

    (@mm7916mm7916)


    Hello Everyone,

    I am wanting to let people upload their own Cover Photo (logo) inside their own profile within a job board, so others can see a picture of their logo. I don’t see an option for them to select a Cover Photo from the form options that I can add to the page. What do I need to do on this page to give them to option to select their own Cover Photo?

    The page I need help with: [log in to see the link]

Viewing 10 replies - 16 through 25 (of 25 total)
  • @mm7916mm7916

    Yes, you are right changing settings for the Profile photo
    will not remove the photo from the Profile page.

    This will require Profile Template changes.

    @mm7916mm7916

    You can try this code snippet.
    Replace 1062 with your Profile Form ID

    add_action( 'um_before_profile_main_meta', 'um_before_profile_main_meta_photo_excl', 10, 1 );
    
    function um_before_profile_main_meta_photo_excl( $args ) {
    
        if ( $args['form_id'] == '1062' ) {
            $html = str_replace( 'class="um-profile-photo-img"', 'style="display: none;"', ob_get_clean() );
            ob_start();
            echo $html;
        }
    }

    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/

    Thread Starter mm7916mm7916

    (@mm7916mm7916)

    Hi, I added it using the Code Snippets plugin, but still see the Profile Image. Is there a way in this forum to upload an image for you to see? I tried copying and pasting a picture but with no success…

    @mm7916mm7916

    Did you change 1062 in the code snippet to the Form ID of your Profile page?

    You can upload a screen copy to Imgur and share the link here in the Forum.

    Thread Starter mm7916mm7916

    (@mm7916mm7916)

    I did. Here is what it is displaying currently…

    View post on imgur.com

    Thread Starter mm7916mm7916

    (@mm7916mm7916)

    I’m trying to make this gray area disappear…

    This is what I put in Code Snippet. Is this correct?

    add_action( ‘um_before_profile_main_meta’, ‘um_before_profile_main_meta_photo_excl’, 10, 1 );

    function um_before_profile_main_meta_photo_excl( $args ) {

    if ( $args['form_id'] == '63360' ) {
        $html = str_replace( 'class="um-profile-photo-img"', 'style="display: none;"', ob_get_clean() );
        ob_start();
        echo $html;
    }

    }

    @mm7916mm7916

    I have tested OK with both installation with the “Code Snippet” plugin
    and with the active Theme’s functions.php file
    both with an uploaded Profile photo and without uploaded Profile photo.

    Make sure that your code snippet installation is both saved and activated
    without any “Code Snippet” plugin warnings.

    Verify with UM Forms overview page that 63360 is the ID of your Profile page

    • This reply was modified 3 months, 3 weeks ago by missveronica.

    @mm7916mm7916

    Your Profile page Form ID is 63833

    Thread Starter mm7916mm7916

    (@mm7916mm7916)

    Ok, don’t let this go to your head, but… “You are a Genius!” It finally worked! Thank you so much!

    Thanks for this, I just needed to do the same so thanks so much!

Viewing 10 replies - 16 through 25 (of 25 total)
  • You must be logged in to reply to this topic.