Last active
January 7, 2022 04:37
-
-
Save webtoffee-git/81c2f0a148e5e39c9d275d81d0a66f8f to your computer and use it in GitHub Desktop.
Modify number of columns - Related Products for WooCommerce (https://wordpress.org/plugins/wt-woocommerce-related-products/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //do not copy this line | |
/** | |
* Modify no.of columns - related products | |
* Note: It does not work for all themes because of the way they're coded. | |
*/ | |
function wt_crp_related_products_args( $args ) { | |
$args['columns'] = 4; // arranged in 4 columns | |
return $args; | |
} | |
add_filter( 'woocommerce_output_related_products_args', 'wt_crp_related_products_args', 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment