Skip to content

Instantly share code, notes, and snippets.

@harisrozak
Last active August 29, 2015 14:09
Show Gist options
  • Save harisrozak/1afdbfcbc8d943cba42f to your computer and use it in GitHub Desktop.
Save harisrozak/1afdbfcbc8d943cba42f to your computer and use it in GitHub Desktop.
WordPress :: Add image meta size
<?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