WordPress display custom field


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <!-- Begin photo -->
  2. <?php $photo=get_post_meta($post->ID, 'photolink', true); ?>
  3. <?php if ( $photo ) : ?>
  4. <a rel="lightbox" title="full image" href=<?php echo $photo ?>>
  5. <img class="photo" src=<?php echo $photo ?> /></a>
  6. <?php endif; ?>

URL: http://bit.ly/nrice08-wpcf

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.