Link thumbnail to Page
Step 1:
In The Loop portion(Index, Archives..template) insert following code:
<?php $content = explode('<!--noteaser-->', $post->post_content, 2); if( $content[1] ) : ?> <div id="thumbnail"> <a href="<?php the_permalink(); ?>"><?php echo trim(strip_tags($content[0], '<img>')); ?></a> </div><!--end of thumbnail--> <br/> <a href="<?php the_permalink(); ?>">'..Read the rest of this entry »'</a> <?php else: ?> <?php the_content('Read the rest of this entry »'); ?> <?php endif; ?>
Step 2:
In post page,put
<!--noteaser-->
<!–more–>
just behind the firt picture and paragraph.
Step 3:
Modify Stylesheet
\*-------------CSS---------------*\ #thumbnail { font-weight:normal; text-align:justify; font-family:Arial, Helvetica, sans-serif; font-size:12px; } #thumbnail img{ width:240px; margin-right:5; margin-bottom:5; } #thumbnail a{ font-weight:normal; color:#000; border-bottom: 0px solid #FFF; text-decoration:none; } #thumbnail a:hover{ font-weight:normal; color:#000; border-bottom: 0px solid #FFF; text-decoration:none; }
eLapin Feed
Leave a Reply