We set a custom field named "thumbnail" and its value to "http://mydomain.com/img/img.jpg". And then we add the following code in our template where we want the thumnail to appear.
As this, we could use this code to show anything we want, not only thumnails. Just set a key and a value different.
- //in our template, we put this code wherever we want the thumbail to appear
- <a class="myThumbClass" href="<?php the_permalink(); ?>">
- <img src="<?php echo get_post_meta($post->ID,'thumbnail',true); ?>">
You need to login to post a comment.