custom field image

a guest Feb 27th, 2012 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!--custom field foto-->
  2. <div id="custom_foto_single_posts" class="foto">
  3. <?php $foto = get_post_meta($post->ID, 'foto', true); ?>
  4. <?php if($foto): ?>                      
  5. <img src="<?php echo $foto ?>" alt="imagen principal post" width="520"/>
  6. <?php endif; ?>
  7. </div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand