Support

Account

Home Forums Front-end Issues Remove 'http://' from text fields Reply To: Remove 'http://' from text fields

  • I see!! So I changed the code like below. It seems to work

    Thanks

    <?php if ( $site = get_field( 'vendor_fb' ) ) : ?>
        <?php
        $site = str_replace(array('http://', 'https://'), '', $site);
        $site = rtrim($site, '/');
        $url = get_field( 'vendor_fb' );?>
        <a class="vendor-link" href="<?php echo $url ?>" target="_blank"><?php echo $site ?></a>
    <?php endif; ?>