• Resolved hebhansen

    (@hebhansen)


    Hey

    I use shortcode to display 4 product or categories. When setting limit to 4 and columns to 4 (display in one row), they display in 2 rows and 2 columns floated left with empty space on the right.

    2 x 2 is exactly what I want on mobile, which looks great but for large screen I want 1 row and 4 items.

    Can I fix this using css?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Igor H

    (@ihereira)

    Hello,

    Can you please provide a link to the page so that we can take a closer look?

    Looking forward to hearing from you.

    Thread Starter hebhansen

    (@hebhansen)

    Hey Igor

    From wide screen you will see odd behaviour here

    anastas10s

    (@anastas10s)

    Howdy @hebhansen ??

    2 x 2 is exactly what I want on mobile, which looks great but for large screen I want 1 row and 4 items.

    Can I fix this using css?

    I see. Thank you for providing the site’s URL, so that we could investigate further. I can see what you are describing in the Uniforms and Styles sections, for example, on desktop. It is showcased in the screenshot directly linked here.

    Could you share with us the shortcode you are using right now, please?

    As an alternative, you could go ahead with replacing the shortcode with a Columns block. Similarly, with four, equally sized, columns. Each one would contain one image, from the four categories/products, as required.

    I trust that points you in the right direction, but if you have more questions, let us know. We’re happy to help.

    Thread Starter hebhansen

    (@hebhansen)

    Hey @anastas10s

    I am using this shortcode:

    [random_product_categories class=”remove-title” number=”3″ columns=”3″ parent=”689″]

    It calls a PHP snippet. However the display of 4 in two columns is exactly the same behaviour for Product Shortcodes.

    I think what I need is some kind of !important attribute in css for the display, since theme overrules 4 columns and forces things into a 3 column grid…. This is what I assume…

    Php code is found here

    • This reply was modified 2 years ago by hebhansen.
    anastas10s

    (@anastas10s)

    Hi there @hebhansen ??

    It calls a PHP snippet. However the display of 4 in two columns is exactly the same behaviour for Product Shortcodes.

    +

    Php code is found here

    Thanks for reaching back. From your response in that thread (direct link here), I understand that you are not good with PHP.

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    Kindly keep in mind the response posted on the thread (direct link here) and the fact that we are not developers and only offer support for existing functionality. There are recommended resources included in that response.

    Please see our Support Policy: https://www.woocommerce.com/support-policy/

    I trust that points you in the right direction, but if you have more questions, let us know. We’re happy to help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘4 categories/products – 4 columns – 1 row not working’ is closed to new replies.