I would like to use my excerpt field to display a different image for each post to represent that post. For instance a post about a new album instead of having a title/text excerpt would simply be an image of that album.
I create i new post like :
<img class="alignnone size-thumbnail wp-image-1078" title="" src="http://localhost/mywebsite/wp-content/uploads/2013/01/22224-213x187.png" alt="" width="213" height="187" />
<!--more-->
TEST
<img class="alignnone size-thumbnail wp-image-1078" title="" src="http://localhost/mywebsite/wp-content/uploads/2013/01/22224-213x187.png" alt="" width="213" height="187" />
single-photos.php :
<div <?php post_class() ?> id="post-<?php the_ID(); ?>=">
<?php echo get_the_excerpt(); ?>
</div>
With this code, displays only the text, and not the image. I want to display only image or gallery. How to do that? Thanks.
get_the_excerpt()on a single post page (or custom post type)? I assume that that is a single post type page since you are referencingsingle-photos.php. – WP Themes Jan 31 at 1:05