Thumbnails on frontpage
-
Hi,
I would like all articles on the front page to have a thumbnail picture on the front page, and a regular size picture when you see the full post. Like on this page: https://www.gate303.net/
I have found an article that describes how to do that: https://www.gate303.net/2007/09/25/wordpress-custom-fields-guide/
But i have no idea where i should put that code:
<?php if(get_post_meta($post->ID, "thumbnail", true)) { $size = getimagesize($_SERVER["DOCUMENT_ROOT"].get_post_meta($post->ID, "thumbnail", true)); ?> <img src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="" width="<?php echo $size[0]; ?>" height="<?php echo $size[1]; ?>" /> <?php } ?>
I guess it should go somewhere in a .php file in my theme. But where?
Can someone please guide me a little bit?Thanks.
/Martin
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Thumbnails on frontpage’ is closed to new replies.