Support » Fixing WordPress » Linkable Custom Field Image

  • This is the code… I think. So there would be 2 custom fields to create the linkable image. I would add this code to my php file. What I don’t get is where do I place the url to the image stored on my site?

    <?php if( get_post_meta($post->ID, "img", true) ): ?>
    
    <p><a href="<?php echo get_post_meta($post->ID, "imglink", true); ?>"><img src="<?php echo get_post_meta($post->ID, "img", true); ?>"></a></p>
    
    <?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Linkable Custom Field Image’ is closed to new replies.