• Resolved californiawine

    (@californiawine)


    For 2 days I’ve been trying to fix image sizes for my woocommerce categories shortcode, so 4 categories will fit on one row, not spill onto two rows (they are too large). No fixes seem to work – the images still appear much larger than the other thumbnails (see images above which use other woocommerce shortcode). I have tried the regenerate thumbnails plugin as well as a bunch of code added to my functions.php file, but there is no change in these images.

    I hope someone has the magic code that will help me here.

    Thank you in advance.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Please post the url to a relevant page. I can’t find the one in your screenshot. Its necessary to examine the markup and styles with browser tools.

    Thread Starter californiawine

    (@californiawine)

    Thank you so much. It is currently in draft mode, that’s why I didn’t post a URL. I’ve published it now – please see (though still unfinished):

    https://www.californiawine.dk/da/om/forside-ny

    By the way, I’ve had major issues with WPBakery Page builder. It deactivates about every 6 hours and adds extra code (empty rows / columns). I used this page builder to make the categories slider.

    For the new wines slider I’m seeing 4 to a row, and for the recommended wines I’m also seeing 4 to a row. The wine districts at the bottom are 3 to a row. Is that where you mean? Should I be looking at another page?

    Regenerate thumbnails controls the size of the images sent to the browser, but not the size at which they are displayed. That’s controlled by the style sheets. The browser will enlarge or shrink the thumbnails to fit the space allocated by the styles.

    WP Bakery page builder is not supported by www.ads-software.com. You’ll need to ask at the vendor’s support service.

    Myself, I would leave W3 Total Cache deactivated until the site is fully developed and debugged. It can mask what’s going on.

    Thread Starter californiawine

    (@californiawine)

    Thank you so much, lorro, for your thorough reply. It is indeed the wine districts I am having trouble with (the only woocommerce categories shortcode on the page). I don’t see where I can set the row to 4 categories via the shortcode, though – I am only able to choose my categories. Very strange; I welcome any suggestions you may have.

    I will deactivate W3 as you suggested.

    Unfortunately, WP Bakery came bundled with the theme and will not update automatically, so I think I may be stuck with this.

    Thank you again.

    Have you seen:
    https://docs.woocommerce.com/document/woocommerce-shortcodes/

    You can set the number of columns per row with the columns parameter, so:
    [products columns="4" categories="24,23,21,42" limit="4"]

    Thread Starter californiawine

    (@californiawine)

    Thanks so much for hanging in there with me. Unfortunately, setting number of columns does not change it one bit, unless I did it wrong:

    [/vc_column_text][/vc_column][products_categories columns=”4″ category=”napa-valley, paso-robles-central-coast, russian-river-valley-2, santa-ynez-valley, ” orderby=”title” order=”asc”][vc_column_text]

    Any other ideas are greatly appreciated. ??

    The shortcode doesn’t look right. Try:
    [product_categories ids="24,23,21,42" columns="4" orderby="name" order="ASC"]

    “categories” is not a valid parameter for that shortcode. You need to use “ids”. “title” is not valid for orderby, use “name”.

    Ensure you are using straight quotes, not curly/smart quotes.

    See:
    https://docs.woocommerce.com/document/woocommerce-shortcodes/#product-category-shortcodes

    Thread Starter californiawine

    (@californiawine)

    OK, I did as you mentioned and saved it under the WP Bakery page slider that we’ve been trying to fix using their template (please see page). The result is the same, unfortunately, though the Woo shortcode is not as stylish. So still wrapping one row below. Darn! ?? What else could I try…?

    I tried:
    [products columns="4" categories="24,23,21,42" limit="4"]
    and it works fine for me, so either your shortcode is not correct or something in your setup, maybe in Bakery, is making 3 columns.

    You can force 4 columns with some custom css:

    @media (min-width: 768px) {
      .col-sm-4 {
        width: 25% !important;
        clear: none !important;
      }
    }

    Custom CSS goes in:
    Dashboard > Appearance > Customize > Additional CSS.

    However, I think this is a sticking plaster over some other incorrect setting.

    Hi @californiawine,

    It’s been a while since we heard from you, so I’m marking this thread resolved. Hopefully, you’ve been able to resolve this, but if you haven’t, please let open up a new topic and we’ll be happy to help out.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘woocommerce categories shortcode cannot change image size’ is closed to new replies.