Wordpress theme

SharkTanker

Tech Guru
Trusted Uploader
Oct 30, 2018
388
648
93
corporatehitech.com.au
Hello,
I need assistance with customizing wordpress theme. I would like to change image height/ratio of woocommerce prodacts.
Here is the link of the website:


Thank you
@TassieNZ @Jano
Hi Sara,

Sometimes the theme itself has internal settings to make changes to the WooCommerce products, if this theme is WooCommerce compatible. If not, you will need to apply custom codes to do that.

Here is the code to make your WooCommerce products at a reasonable size than their current size. If it doesn't work just message me and I'll some things up.
CSS:
.img-responsive .wp-post-image
{
    height: 150px;
}
 
  • Like
Reactions: TassieNZ and Sara7

Sara7

Well-known member
Trusted Uploader
Aug 13, 2019
364
470
70
From many different places
Hi Sara,

Sometimes the theme itself has internal settings to make changes to the WooCommerce products, if this theme is WooCommerce compatible. If not, you will need to apply custom codes to do that.

Here is the code to make your WooCommerce products at a reasonable size than their current size. If it doesn't work just message me and I'll some things up.
CSS:
.img-responsive .wp-post-image
{
    height: 150px;
}
@Jano Thank you for your quick response and for your assistance.
I'll try that :)
 
  • Like
Reactions: BigBob

Scorp

Well-known member
Trusted Uploader
May 12, 2019
572
888
93
Earth, Universe.
www.servebabiato.tk
Hello,
I need assistance with customizing wordpress theme. I would like to change image height/ratio of woocommerce prodacts.
Here is the link of the website:


Thank you
@TassieNZ @Jano
Resizing Single Product Image
Follow these steps to change single product image size:
  1. Go to Appearance > Customize
  2. Then go to WooCommerce > Product Images
  3. Write your desired width in “Main image width” field.
  4. Click on “Publish
 
  • Like
Reactions: Sara7

Scorp

Well-known member
Trusted Uploader
May 12, 2019
572
888
93
Earth, Universe.
www.servebabiato.tk
Hello,
I need assistance with customizing wordpress theme. I would like to change image height/ratio of woocommerce prodacts.
Here is the link of the website:


Thank you
@TassieNZ @Jano
Resizing Product Thumbnail Image
Follow these steps to change shop, catalog or product category image size:
  1. Go to Appearance > Customize
  2. Then go to WooCommerce > Product Images
  3. Write your desired width in “Thumbnail width” field.
  4. You can set the height of the images in “Thumbnail Cropping
  5. Click on “Publish
Thumbnail Cropping
  • 1:1: If you select 1:1, your images will be cropped into 360px width and 360px Height (assuming you have set the image width 360px in Thumbnail Width field.
  • Custom: In Custom you can select the aspect ratio of the image. Here is some of the popular aspect ratio (1:1, 5:4, 4:3, 3:2, 16:9 and 3:1).
  • Uncropped: Height of the image will be untouched. Images will display using the aspect ratio in which they were uploaded.
You have to remove or change the image width settings from your themes functions.php file. For example, In Storefront, you will not find any Main Image or Thumbnail field settings. Because they declared that beforehand in storefront/inc/class-storefront.php

4
5
6
7
8
9
10
11
12
// Declare WooCommerce support.
add_theme_support( 'woocommerce', apply_filters( 'storefront_woocommerce_args', array(
'single_image_width' => 416,
'thumbnail_image_width' => 324,
'product_grid' => array(
'default_columns' => 3,
'default_rows' => 4,
'min_columns' => 1,
'max_columns' => 6,
'min_rows' => 1
)
) ) );
Single Product Image has been set to 416px wide and thumbnail to 324px wide. In that case, you can either remove these two lines or change the width number to your desired width. But make the change after creating a child theme; otherwise, it will revert back to previous settings if you update the theme.
 
  • Like
Reactions: Sara7

Sara7

Well-known member
Trusted Uploader
Aug 13, 2019
364
470
70
From many different places
Resizing Product Thumbnail Image
Follow these steps to change shop, catalog or product category image size:
  1. Go to Appearance > Customize
  2. Then go to WooCommerce > Product Images
  3. Write your desired width in “Thumbnail width” field.
  4. You can set the height of the images in “Thumbnail Cropping
  5. Click on “Publish
Thumbnail Cropping
  • 1:1: If you select 1:1, your images will be cropped into 360px width and 360px Height (assuming you have set the image width 360px in Thumbnail Width field.
  • Custom: In Custom you can select the aspect ratio of the image. Here is some of the popular aspect ratio (1:1, 5:4, 4:3, 3:2, 16:9 and 3:1).
  • Uncropped: Height of the image will be untouched. Images will display using the aspect ratio in which they were uploaded.
You have to remove or change the image width settings from your themes functions.php file. For example, In Storefront, you will not find any Main Image or Thumbnail field settings. Because they declared that beforehand in storefront/inc/class-storefront.php

4
5
6
7
8
9
10
11
12
// Declare WooCommerce support.
add_theme_support( 'woocommerce', apply_filters( 'storefront_woocommerce_args', array(
'single_image_width' => 416,
'thumbnail_image_width' => 324,
'product_grid' => array(
'default_columns' => 3,
'default_rows' => 4,
'min_columns' => 1,
'max_columns' => 6,
'min_rows' => 1
)
) ) );
Single Product Image has been set to 416px wide and thumbnail to 324px wide. In that case, you can either remove these two lines or change the width number to your desired width. But make the change after creating a child theme; otherwise, it will revert back to previous settings if you update the theme.
Thank you @Scorp for your detailed instructions. Luckily, @Jano already solved that issue (with a help of magic) :)
 
  • Like
Reactions: BigBob and TassieNZ

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu