Marlena Bobowska

  /  Uncategorized   /  ustawienia dla zdjęć i miniatur woocommerce

ustawienia dla zdjęć i miniatur woocommerce

Image Sizes for Theme Developers

add_theme_support( ‚wc-product-gallery-zoom’ );
add_theme_support( ‚wc-product-gallery-lightbox’ );
add_theme_support( ‚wc-product-gallery-slider’ );

add_theme_support( ‚woocommerce’, array(
‚thumbnail_image_width’ => 200,
‚gallery_thumbnail_image_width’ => 150,
‚single_image_height’ => 500,
) );

add_filter( ‚woocommerce_get_image_size_gallery_thumbnail’, function( $size ) {
return array(
‚width’ => 150,
‚height’ => 150,
‚crop’ => 0,
);
} );

add_filter( ‚woocommerce_get_image_size_single’, function( $size ) {
return array(
‚width’ => 600,
‚height’ => 600,
‚crop’ => 0,
);
} );

Post a Comment