WordPress.org

Forums

Advanced Custom Fields
[resolved] add a Hyperlink (4 posts)

  1. Mark Shirley
    Member
    Posted 1 year ago #

    Does anyone have a any code for: displaying type that says eg "go to" or something similar on the post and the user can add a URL into a custom field.

    https://wordpress.org/plugins/advanced-custom-fields/

  2. ahmadjan
    Member
    Posted 1 year ago #

    How do you resolve this ? Can you please explain ? Thanks.

  3. Mark Shirley
    Member
    Posted 1 year ago #

    Hi here are some screenshots of AFC in wordpress and the code for the page template

    https://lh5.googleusercontent.com/-VbTMlZcgQB8/U3yQIG1fo6I/AAAAAAAAFbw/AOWRAwTYX6c/w693-h651-no/Screen+Shot+2014-05-21+at+12.15.59.png

    https://lh3.googleusercontent.com/-WGe209KIzwM/U3yQPxoKGkI/AAAAAAAAFcY/TgBPLWPwVN0/w1356-h740-no/Screen+Shot+2014-05-21+at+12.30.46.png

    https://lh4.googleusercontent.com/-wSFp_YexZJA/U3yQW1w-3zI/AAAAAAAAFdA/RMJ1Tl43tRo/w1160-h838-no/Screen+Shot+2014-05-21+at+12.31.22.png

    <li> <?php $my_meta = get_post_meta( $post->ID, 'link', true );  ?><?php if( $my_meta && '' != $my_meta ) : ?><a href="<?php echo $my_meta ?>">More Information</a><?php endif; ?></li>
  4. Captain Theme
    Member
    Posted 1 year ago #

    You could just use:
    $my_meta = get_field( 'link' );
    fyi

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Custom Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic