How to remove https:// from shortcode generated url

I am using the following code to create a shortcode that generates the URL of my website:

add_shortcode( 'base_url', 'baseurl_shortcode' );
function baseurl_shortcode( $atts ) {

    return site_url();


However, when the url is generated it has https:// In its beginning. Is there any way to remove it please?

Leave a Comment