Skip to content

Instantly share code, notes, and snippets.

@kachi
Created March 10, 2012 16:27
Show Gist options
  • Save kachi/2011937 to your computer and use it in GitHub Desktop.
Save kachi/2011937 to your computer and use it in GitHub Desktop.
<?php
if ( function_exists( 'add_image_size' ) ) {
add_image_size( 'foo-thumb', 400, 9999 );
add_image_size( 'bar-thumb', 240, 180, true );
} ?>
/*テーマファイルで下記のように記述*/
<?php echo get_the_post_thumbnail($post->ID, 'foo-thumb'); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment