Remove image space if no image?
-
I have a theme that shows a thumbnail of an image beside each post excerpt on the front page (this is acheived through Custom Fields).
I would like it to *not* leave a space if there is no image. Is this possible?
The website is here:
http://www.newderbymp.co.ukA snapshot of the area of concern is here:
http://imgur.com/4ZUMU.jpgThe code used for the post in the theme is:
<div class="entry"> <?php $thumb = get_post_meta($post->ID, 'Thumbnail', $single = true); ?> <?php if($thumb !== '') { ?> <div class="thumbnail-div" style="margin-bottom: 10px;"> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo $thumb; ?>&h=150&w=90&zc=1&q=100" width="90px" style="border: none;" height="150px" alt="<?php if($thumb_alt !== '') { echo $thumb_alt; } else { echo the_title(); } ?>" /></a> </div> <?php } else { echo ''; } ?> <div class="post-content"> <h2 class="titles"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title2('', '...', true, '50') ?></a></h2> <?php the_content_limit(420, ""); ?> <div class="readmore"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Read More</a></div> </div> </div>
Hope someone can help!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Remove image space if no image?’ is closed to new replies.