Created
October 19, 2011 12:08
-
-
Save jaspertandy/1298113 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in functions.php | |
if ( function_exists( 'add_theme_support' ) ) { | |
add_theme_support( 'post-thumbnails' ); | |
set_post_thumbnail_size( 150, 150 ); // default Post Thumbnail dimensions | |
add_image_size('homepage-image', 327, 218, true); | |
add_image_size('single-image', 675, 450, true); | |
} | |
then in the single.php i have | |
<?php | |
$images =& get_children('post_type=attachment&post_mime_type=image&post_parent=' . $post->ID ); | |
foreach ($images as $image) : ?> | |
<li><?php echo wp_get_attachment_image($image->ID, 'single-image'); ?></li> | |
<?php endforeach ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment