WordPress.org

Forums

Download Monitor
Image sizes in templates (2 posts)

  1. Matthew Fries
    Member
    Posted 1 year ago #

    I can't find this in the documentation. Do you support images sizes for the thumbnail to be viewed with downloads? I found $dlm_download->the_image(); in the template, but no explanation of any options.

    Thanks...

    https://wordpress.org/plugins/download-monitor/

  2. vicctim
    Member
    Posted 1 year ago #

    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(); ?>
    this
    <?php $dlm_download->the_image('large-thumb') ; ?>

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Download Monitor
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.