Widgets Pack FAQ

The EDD Widgets Pack may be purchased here.

1. Why is the Most Commented Download Widget not working?

This widget works if comments have been enabled for the download's post type. To do so use the following code:

// Download Comment Supports
if ( ! function_exists( 'your_prefix_edd_download_supports' ) ) {
    function your_prefix_edd_download_supports( $supports ) {
        $supports[] = 'comments';
        return $supports;
    }
}
add_filter( 'edd_download_supports', 'your_prefix_edd_download_supports' );<br>

2. How to set a fixed size for the widget's thumbnail image?

The EDD Widgets pack allows to set a fixed thumbnail size from code, this way you can ensure the widget will looks good on your theme. To do so use the filters bellow:

// Set EDD Widgets Pack default image size
if ( ! function_exists( 'your_prefix_edd_widgets_thumbnail_size' ) ) {
    function your_prefix_edd_widgets_thumbnail_size( $size ) {
        return array( '56', '56' );
    }
}
add_filter( 'edd_widgets_top_sellers_thumbnail_size', 'your_prefix_edd_widgets_thumbnail_size' );
add_filter( 'edd_widgets_most_recent_thumbnail_size', 'your_prefix_edd_widgets_thumbnail_size' );
add_filter( 'edd_widgets_most_commented_thumbnail_size', 'your_prefix_edd_widgets_thumbnail_size' );
add_filter( 'edd_widgets_related_downloads_thumbnail_size', 'your_prefix_edd_widgets_thumbnail_size' );
// Set EDD Widgets Pack default image size for widgets that show only one download
if ( ! function_exists( 'your_prefix_edd_widgets_single_thumbnail_size' ) ) {
    function your_prefix_edd_widgets_single_thumbnail_size( $size ) {
        return array( '155', '156' );
    }
}
add_filter( 'edd_widgets_random_download_thumbnail_size', 'your_prefix_edd_widgets_single_thumbnail_size' );
add_filter( 'edd_widgets_featured_download_thumbnail_size', 'your_prefix_edd_widgets_single_thumbnail_size' );<br>