• Resolved joint77

    (@joint77)


    Hi, thanks for your work, this theme is awesome.

    I’ve a problem.

    I want change the size of sub-category image in category page.

    Now the image in category is a crop thumb of original image, is possible to use the the larges images?

    Example, now the code is (FIRST CODE):

    <div class="product-category grid_item  kad-first">
    	<a href="https://www.lafeniceantiquariato.com/woocommerce/categoria-prodotto/catalogo/bondage/">
    				<img src="https://www.lafeniceantiquariato.com/woocommerce/wp-content/uploads/2014/01/categoria_bondage-270x270.jpg" alt="Bondage">
    		<h5>Bondage <mark class="count">(1)</mark></h5>
    	</a>
    </div>

    I wish it were (SECOND CODE)

    <div class="product-category grid_item  kad-first">
    	<a href="https://www.lafeniceantiquariato.com/woocommerce/categoria-prodotto/catalogo/bondage/">
    				<img src="https://www.lafeniceantiquariato.com/woocommerce/wp-content/uploads/2014/01/categoria_bondage-770x300.jpg" alt="Bondage">
    		<h5>Bondage <mark class="count">(1)</mark></h5>
    	</a>
    </div>

    Sample image

    quale pagina devo andare a modificare e come?

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • For the columns to work right you it’s best to leave the width at 270px but you can certainly test it out.

    edit lines 26 and 27 of virtue/woocommerce/content-product_cat.php

    You will just want to change these.
    $catimgwidth = 270;
    $catimgheight = 130;

    Kadence Themes

    Thread Starter joint77

    (@joint77)

    Thanks, but the problem is the source image in use.

    In first code is a cropped thumb image

    Example

    In second is the large image

    Example

    How i can change the source image only in category page???

    Try this:

    edit lines 26 and 27 of virtue/woocommerce/content-product_cat.php

    You will just want to change these to:

    $catimgwidth = null;
    $catimgheight = null;

    Kadence Themes

    Thread Starter joint77

    (@joint77)

    With your code I’don’t see the image

    Thread Starter joint77

    (@joint77)

    I think I need to change the code at line 101

    $image_cat_url = wp_get_attachment_image_src( $thumbnail_id, ‘full’);

    but I do not know how to do to use the large image and not the cropped image

    sorry try:
    edit line 59 of virtue/woocommerce/content-product_cat.php

    Change this :
    echo '<img src="' . $cat_image . '" alt="' . $category->name . '" />';

    for this:
    echo '<img src="' . $image_cat_url. '" alt="' . $category->name . '" />';

    Kadence Themes

    Thread Starter joint77

    (@joint77)

    Thanks, now working!!!

    The line in my content-product_cat.php is the 117.

    Thanks!!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Chenge sub-category image size in category page’ is closed to new replies.