Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ORIGINAL FROM REVOLUTION LIVESTYLE
- <?php if( get_post_meta($post->ID, "thumbnail", true) ): ?>
- <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="<?php the_title(); ?>" /></a>
- <?php else: ?>
- <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php bloginfo('template_url'); ?>/images/thumbnail.png" alt="<?php the_title(); ?>" /></a>
- <?php endif; ?>
- EDITED VERSION
- <?php if( get_post_meta($post->ID, "thumbnail", true) ): ?>
- <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="<?php the_title(); ?>" /></a>
- <?php elseif(get_the_post_thumbnail($post->ID)) : ?>
- <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail(); ?></a>
- <?php else: ?>
- <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php bloginfo('template_url'); ?>/images/thumbnail.png" alt="<?php the_title(); ?>" /></a>
- <?php endif; ?>
- THAT IS THE GENERAL IDEA:
- a: check for the custom field images - if there - use theme (old posts);
- b: check for featured images - if there - use them (new posts);
- c: show default;
- similar for the 'hpbottom' ones;
- you probably need to adapt this to your edits so far;
- and you probably need to fill a few parameter into the thumbnail codes:
- http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail
- http://codex.wordpress.org/Function_Reference/the_post_thumbnail
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement