Skip to content

Instantly share code, notes, and snippets.

@jjjjcccjjf
Created March 6, 2017 07:29
Show Gist options
  • Save jjjjcccjjf/a6ca87d06c594d92d2938aa094505da5 to your computer and use it in GitHub Desktop.
Save jjjjcccjjf/a6ca87d06c594d92d2938aa094505da5 to your computer and use it in GitHub Desktop.
Wordpress code snippets
<?php //Default WordPress
the_post_thumbnail( 'thumbnail' ); // Thumbnail (150 x 150 hard cropped)
the_post_thumbnail( 'medium' ); // Medium resolution (300 x 300 max height 300px)
the_post_thumbnail( 'medium_large' ); // Medium Large (added in WP 4.4) resolution (768 x 0 infinite height)
the_post_thumbnail( 'large' ); // Large resolution (1024 x 1024 max height 1024px)
the_post_thumbnail( 'full' ); // Full resolution (original size uploaded)
//With WooCommerce
the_post_thumbnail( 'shop_thumbnail' ); // Shop thumbnail (180 x 180 hard cropped)
the_post_thumbnail( 'shop_catalog' ); // Shop catalog (300 x 300 hard cropped)
the_post_thumbnail( 'shop_single' ); // Shop single (600 x 600 hard cropped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment