Support » Plugin: Gallery by BestWebSoft » album-thumb and photo-thumb doesn't seem to work

  • Resolved webheadllc

    (@webheadllc)


    Hi,

    This is a great plugin, but I noticed my pages were loading the full size images on the galleries. Looking through the code it seems like the image sizes are only added on the admin side. I added the following to my theme and regenerated thumbnails and the correct image sizes are now used on the gallery and gallery-single templates.

    function wh_setup() {
        // get options from the database
        if ( 1 == $wpmu )
         $gllr_options = get_site_option( 'gllr_options' ); // get options from the database
        else
         $gllr_options = get_option( 'gllr_options' );// get options from the database
    
        if ( !empty($gllr_options) && !empty( $gllr_options['gllr_custom_size_px'] ) ) {
            add_image_size( 'album-thumb', $gllr_options['gllr_custom_size_px'][0][0], $gllr_options['gllr_custom_size_px'][0][1], true );
            add_image_size( 'photo-thumb', $gllr_options['gllr_custom_size_px'][1][0], $gllr_options['gllr_custom_size_px'][1][1], true );
        }
    }
    endif;
    add_action( 'after_setup_theme', 'wh_setup' );

    http://wordpress.org/plugins/gallery-plugin/

Viewing 1 replies (of 1 total)
  • Plugin Author bestwebsoft

    (@bestwebsoft)

    Hello webheadllc,

    Perhaps, you initially had some errors when you installed plugin and necessary data didn’t come to the database.
    We will note this but in the future versions.
    We are happy that you solved this problem.

    Kind regards,
    Support Team

Viewing 1 replies (of 1 total)
  • The topic ‘album-thumb and photo-thumb doesn't seem to work’ is closed to new replies.