Created
March 6, 2017 07:29
-
-
Save jjjjcccjjf/a6ca87d06c594d92d2938aa094505da5 to your computer and use it in GitHub Desktop.
Wordpress code snippets
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
<?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