Posted By

mesh606 on 03/04/11


Tagged

plugin wordpress simple fields simplefields


Versions (?)

Wordpress Simple Fields Plugin - Show Images


 / Published in: PHP
 

Bring in a file / image to your wp template

  1. ?php
  2. $image_id = get_post_meta(get_the_ID(), "your-id-here", true, 2);
  3. $img_src = wp_get_attachment_url($image_id, 'thumbnail');
  4. ?>
  5. <img src="<?php echo $img_src ?>" alt="An image" />

Report this snippet  

You need to login to post a comment.