Created
October 12, 2017 19:01
-
-
Save DanielSantoro/d43cf267008676b6a9bc6a137c55b8d8 to your computer and use it in GitHub Desktop.
Lindsey Foard PHP
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 | |
/** | |
* Change the number of Related Products per Page to 5 | |
*/ | |
add_filter( 'woocommerce_output_related_products_args', 'lf_related_products_args', 20 ); | |
function lf_related_products_args( $args ) { | |
$args['posts_per_page'] = 5; // 5 related products | |
$args['columns'] = 5; // arranged in 5 columns | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment