image - I'm developing a wordpress theme and using custom fields. I've got the following code: -


<img src="<?php echo get_post_meta($post->id, 'thumbnail', true);?>" alt="post pic" width="615" height="275" /></a> 

that code giving this:

<img src="" alt="post pic" width="615" height="275"> 

any ideas why image not displaying correctly?

the proper way display featured image post the_post_thumbnail() echo <img> tag page or get_the_post_thumbnail() return result string. should not using custom/meta fields directly.


Comments

Popular posts from this blog

Java sticky instances of class com.mysql.jdbc.Field aggregating -