1
add_action( 'init', function() {

    add_shortcode( 'site_url', function( $atts = null, $content = null ) {
        return site_url();
    });

});

I'm Using The Short Code [site_url] and My Short Code Function Returned https//shad-pro.com/contact-us

How Do I get The Proper Url With Colon :

Image Link

0

Have you checked your wp_options table under the column "site_url". The Colon can be missing in database table.

| improve this answer | |
  • Sorry For The Late Reply But Yes I Checked In My DB The url is Proper With Colon.. – A.M.Alam Sep 18 '19 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.