WordPress (WP) Custom Fields

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

Copy this code and paste it in your HTML
  1. <div class="lead-image-wrapper">
  2. <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  3. <?php $image = get_post_meta($post->ID, 'lead_image', true); ?>
  4. <img alt="<?php the_title_attribute(); ?>" src="<?php echo $image ?>" />
  5. </div>

URL: http://5thirtyone.com/archives/875

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.