• I’ve seen this question several times so here is an answer. Place in your functions.php

    //Add tel link to business profile plugin
    if ( !function_exists( 'vida_component_callbacks' ) ) {
    function vida_component_callbacks( $callbacks ) {
    	if ( !empty( $callbacks['phone'] ) ) {
    		$callbacks['phone'] = 'vida_print_phone';
    	}
    	return $callbacks; 
    }
    add_filter( 'bpwfwp_component_callbacks', 'vida_component_callbacks' );
    }
    /**
     * Print the phone number
     */
    if ( !function_exists( 'vida_print_phone' ) ) {
    function vida_print_phone() {
    	global $bpfwp_controller;
    	$phone = $bpfwp_controller->settings->get_setting( 'phone' );
    	if ( $bpfwp_controller->display_settings['show_phone'] ) :
    	?>
    
    	<div class="bp-phone" itemprop="telephone">
    	<meta itemprop="telephone" content="<?php echo esc_attr( $bpfwp_controller->settings->get_setting( 'phone' ) ); ?>"><a href="tel:+1-317-548-1424">
    	
    		<?php echo bpfwp_setting( 'phone', $location ); ?></a></div>
    		
    		<?php else : ?>
    		<meta itemprop="telephone" content="<?php echo esc_attr( bpfwp_setting( 'phone', $location ) ); ?>">
    
    		<?php endif;
    	
    }
    } 
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘add tel link to phone’ is closed to new replies.