Changing number of Cross Sell items on cart page
-
I recently got your help to change the number of related products to five across the page with the following code:
add_filter( 'woocommerce_output_related_products_args', 'jk_related_products_args' ); function jk_related_products_args( $args ) { $args['posts_per_page'] = 5; // # related products $args['columns'] = 5; // arranged in # columns return $args; }
I’d like to do this with cross sells, and I found the cross-sell.php template, and found a filter for the cross sell columns. I modified the above and came up with this:
add_filter( 'woocommerce_cross_sells_columns_args', 'db_cross_sells_columns_args' ); function db_cross_sells_columns_args( $args ) { $args['posts_per_page'] = 5; // # related products $args['columns'] = 5; // arranged in # columns return $args; }
But nothing happened. But I bet I’m close. Can you advise me what I need to put in here? Thanks, again.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Changing number of Cross Sell items on cart page’ is closed to new replies.