I have a control/setting in my WordPress Customizer that takes an address input by the user and enters it into the url of a Google Map embeded on the page. I'm using esc_html to convert the address (Example: 123 Main Street
) into the proper format (Example: 123%20Main%20Street
) but it's also prepending http://
before it, which I do not need in this case. How do I remove the http://
?
This is the code I have in my template file:
<?php echo esc_url( get_theme_mod( 'address' , __( '123 Main Street', 'myTheme' ) )); ?>
This is the code I have in my customizer.php:
$wp_customize->add_setting( 'address', array(
'default' => __( '123 Main Street', 'myTheme' ),
) );
$wp_customize->add_control( 'address', array(
'label' => __( 'Address', 'myTheme' ),
'type' => 'text',
'section' => 'map'
) );