WordPress.org

Support

Support » How-To and Troubleshooting » https link in custom fields using front end editor

https link in custom fields using front end editor

  • Hi,

    I’m new to wordpress.
    I am using custom fields in front end editor to make posts. Whenever i enter a link with https protocol it automatically adds http protocol before https and “https://www.facebook.com” BECOMES “http://https://www.facebook.com” in post.

    Custom field code in front end editor:

    <input type="text" name="website" id="website" class="textfield" value="<?php echo esc_attr(stripslashes($website)); ?>" size="25"  />

    $website is custom field

    code for retrieving custom field value in post:

    <a href="<?php echo get_post_meta($post->ID,'website',true);?>" target="_blank">Some Text</a>

  • The topic ‘https link in custom fields using front end editor’ is closed to new replies.
Skip to toolbar