Skip to content

Instantly share code, notes, and snippets.

@barbwiredmedia
Last active December 20, 2015 11:59
Show Gist options
  • Save barbwiredmedia/6127382 to your computer and use it in GitHub Desktop.
Save barbwiredmedia/6127382 to your computer and use it in GitHub Desktop.
Wordpress - Functions: Add Featured Image support to Custom Post types
add_theme_support( 'post-thumbnails', array( 'post', 'page', 'works' ) );
add_image_size( '{image-name}', 290, 144, true );
add_image_size( 100, 85, true );
// Prints function
<?php the_post_thumbnail( '{image-name}' ); ?>
<?php the_post_thumbnail(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment