Last active
August 29, 2015 14:09
-
-
Save harisrozak/1afdbfcbc8d943cba42f to your computer and use it in GitHub Desktop.
WordPress :: Add image meta size
This file contains hidden or 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 | |
add_action('init', 'generate_new_thumbnail' ); | |
function generate_new_thumbnail() | |
{ | |
add_theme_support('post-thumbnails'); | |
// the last argument is to crop or no | |
add_image_size('post-thumb', 620, 207, true); | |
add_image_size('home-thumb', 220, 180, true); | |
add_image_size('index-thumb', 300, 100, true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment