Update docs/snippets/number-of-products-per-row.md
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
This commit is contained in:
parent
53926dcf64
commit
96a1e39902
|
@ -15,6 +15,9 @@ if ( ! function_exists( 'YOUR_PREFIX_related_products_args' ) ) {
|
|||
* @return array The modified related products args.
|
||||
*/
|
||||
function YOUR_PREFIX_related_products_args( $args ) {
|
||||
If ( ! is_array( $args ) ) {
|
||||
$args = array();
|
||||
}
|
||||
$args['posts_per_page'] = 4; // 4 related products.
|
||||
$args['columns'] = 2; // Arranged in 2 columns.
|
||||
return $args;
|
||||
|
|
Loading…
Reference in New Issue