Add email in Profile Connect section
-
Hello, I used a custom code to display user URL next to social icons on profile page. That works perfectly. Here is 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'] = '#553198'; } } return $fields; }My problem is that I try to do the same with the user email with this code, but it creates a link adding automatically ‘https://’ before the value of the user email :
add_filter("um_builtin_all_user_fields","um_092221_email_social"); function um_092221_email_social( $fields ){ foreach ( $fields as $field => $args ) { if ( isset( $field ) && $field == 'user_email' ) { $fields[ $field ]['advanced'] = 'social'; $fields[ $field ]['icon'] = 'um-icon-android-mail'; // $fields[ $field ]['match'] = 'https://'; $fields[ $field ]['color'] = '#553198'; } } return $fields; }How to take away the ‘http://’ ? I guess it has to do with the ‘match’ key (that I commented on my second code), but could not figure out how to do that. Can you help ?
The page I need help with: [log in to see the link]
The topic ‘Add email in Profile Connect section’ is closed to new replies.