• torbent

    (@torbentschechnegmailcom)


    Hello,
    I want to display 4 cross sell items in one row on my cart page. I thought this is possible with this snippet:

    add_filter( 'woocommerce_cross_sells_columns', 'change_cross_sells_columns' );
     
    function change_cross_sells_columns( $columns ) {
    return 4;
    }

    This has no effect. Every item of my cross sell has the class “first”:

    https://d.pr/i/hz5T

    How can I change that?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • It may be easiest to fix this with custom css and overwrite the behaviour of class “first”. Please post the url to your site so the cart page can be examined with browser tools.

    Thread Starter torbent

    (@torbentschechnegmailcom)

    Hey, I did fix it with CSS, but I thought of a cleaner solution if WooCommerce has just a setting for it. But I identified, that the cross sells section is only 50% width – so I needed to fix it via CSS anyhow.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cross sells on cart page – 4 in a row?’ is closed to new replies.