Support » Plugins and Hacks » Image sizes in templates

Image sizes in templates

Viewing 1 replies (of 1 total)
  • I was also with this problem until I found the solution.

    Enabling Support for Post Thumbnails

    Themes have to declare their support for post thumbnails before the interface for assigning these images will appear on the Edit Post and Edit Page screens. They do this by putting the following in their functions.php file:

    In functions.php file add this code:

    if ( function_exists( 'add_theme_support' ) ) {
    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 615, 400, true );
    add_image_size( 'slider-thumb', 615, 400, true );
    add_image_size( 'large-thumb', 300, 195, true );
    add_image_size( 'medium-thumb', 108, 70, true );
    add_image_size( 'small-thumb', 48, 48, true );

    In file: content-download-box.php, replace this line:
    <?php $dlm_download->the_image(); ?>
    <?php $dlm_download->the_image('large-thumb') ; ?>

    This ‘large-thumb’ will resize the image to 300x195px.

Viewing 1 replies (of 1 total)
  • The topic ‘Image sizes in templates’ is closed to new replies.