• Resolved Seniah

    (@barbarahaines)


    The following code is working for calling an image using Custom Field with a name of “pic1”. I want this field to link to an external website. It doesn’t work to wrap this img with an a href – the code is stripped out. Any guidance as to how to hard code an external link for this would be appreciated.

    <img class=”pic1″ src=”<?php global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, ‘pic1’, true); wp_reset_query(); ?>”>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Field image with link to external URL’ is closed to new replies.