• Resolved josesebastiao

    (@josesebastiao)


    Hi,

    In the user profile page I show the phone number but it’s only text, I need a link like: href=”tel:<phonenumber>”.

    In wich PHP file I can do this?

    Thank you

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

    You can add this code to your child theme functions.php

    add_filter( 'um_view_field_value_text', 'my_custom_view_field_value', 10, 2);
    
    function my_custom_view_field_value( $res, $data ) {
    	
    	if( $data['metakey'] == 'phone_number' || $data['metakey'] == 'mobile_number' ) {
    		$res = '<a href="tel:' . $res . '">' . $res . '</a>';
    	}
    	return $res;
    }
    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hey there!

    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 by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add a link in the phone value’ is closed to new replies.