• Resolved ninsan

    (@jennyrigsjo)


    Good morning!

    Any chance you will add support for displaying custom urls in the profile header? It’s already possible to display social icons by enabling the option Settings > Appearance > Profile > Show social links in profile header, however this does not seem to include custom urls. Since quite a few of my users have their own websites, it would be nice if they could display a general “globe” link to their website next to the social media icons in their profiles.

    Thanks for an otherwise great plugin! ??

    /jenny

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @jennyrigsjo

    You can try adding this code snippet to your theme/child-theme’s functions.php file or use the Code snippet plugin to run the code:

    add_filter("um_builtin_all_user_fields","um_092221_website_url_social");
    function um_092221_website_url_social( $fields ){
    
        foreach ( $fields as $field => $args ) {
            if ( isset( $field ) && $field == 'user_url' ) {
                $fields[ $field ]['advanced'] = 'social';
                $fields[ $field ]['icon'] = 'um-faicon-globe';
                $fields[ $field ]['match'] = 'https://';
                $fields[ $field ]['color'] = '#96979a';
                
                
            }
        }
    
        return $fields;
    }

    The above code will add the Website URL with the globe icon in the Profile header along with the Social Media icons.

    Regards,

    Thread Starter ninsan

    (@jennyrigsjo)

    Hey @champsupertramp Thank you so much! The code does exactly what I want. Cheers! ??

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Thanks for letting us know.

    Regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show custom url in profile header’ is closed to new replies.