Changing the thumb
-
I have a blog and it uses the Simple Post plugin Thumbnails Thumbnails to create, the more I want to put the thumbs with Custom Field to add external links on the blog, most do not know how to do this without losing the thumbs of old posts. I’ll add one thought to add code that if they can tell me how to do it without losing anything I appreciate it.
Current mood:
<?php function get_thumbnail($postID) { if( function_exists('p75GetThumbnail') ) { $thumbnail = p75GetThumbnail($postID); return $thumbnail ? $thumbnail : get_bloginfo('template_url') . '/images/default-thumb.png'; } return ""; }
Single-post.php
<img src="<?php echo get_thumbnail($post->ID); ?>" alt="<?php the_title() ?>" width="192" height="120" />
I want to add code:
<?php // This will show only the image. Alter the width and height (in both places) to your needs. ?> <?php if ( get_post_meta($post->ID, 'thumb', true) ) { ?> <div class="postthumb"> <img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo get_post_meta($post->ID, "thumb", $single = true); ?>&h=120&w=192&zc=1" alt="<?php the_title(); ?>" /> </div> <?php } ?>
- The topic ‘Changing the thumb’ is closed to new replies.