Wordpress; image not appearing post loop -


i have post before, didn't conclusive answer i'm hoping can me. have setup custom post types, , them, custom fields using wordpress 3's ui.

one of fields have set called banner_image, in loop, doesn't output image.

<?php echo get_post_meta($post->id, 'banner_image', true); ?> 

this outputs id number of post. if set function false, array id in , nothing else. how path image? can't work out , googling reveals sea of content not related problem, it's real difficult 1 search you're hope!

many thanks, michael.

<?php global $post; $tmp_post = $post; $args = array(          'post_status' => 'publish',         'post_type' => 'work',         'order' => 'desc'  );  $myposts = get_posts( $args );  foreach( $myposts $post ) : setup_postdata($post); ?>      <?php if( get_post_meta($post->id, 'show_in_home_banner', true) == "yes" ) { ?>          <li class="slide">              <div class="slide-image">                 <a href="<?php echo get_page_link($post->id) ?>">                     <?php echo get_post_meta($post->id, 'banner_image', true); ?>                 </a>             </div>              <div class="slide-content">                 <h3 class="slide-header"><a href="<?php echo get_page_link($post->id) ?>"><?php echo get_post_meta($post->id, 'sub_title', true); ?></a></h3>                 <p class="slide-title"><strong><?php echo the_title(); ?></strong></p>             </div>          </li>      <?php } ?>  <?php endforeach; ?> 

try this

<?php echo get_post_meta($post->id, 'banner_image', $single); ?> 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -