Images in posts
-
I am using the following code to show 3 posts from 1 catgory on my hompage, the only problem is this is not pulling through the image from the post.(the image is only small so it doesnt need to be a thumbnail). I would like the image to show above the excerpt
<?php if( is_front_page() ) {?>
<div id=”features”>
<?php $posts = get_posts( “category=4&numberposts=3” ); ?>
<?php if( $posts ) : ?>
<?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
<div class=”post”>
<p class=”post-info-home”><span class=”coverbox_header”><?php the_title(); ?></span></p>
<div class=”post-title-home”>
</div>
<div class=”entry”>
<?php the_excerpt(); ?>
” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”>Read more
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
<?php } ?>All help is hugely appreciated
- The topic ‘Images in posts’ is closed to new replies.