0

Change number of related products output Hook

To change the number of related products display in the detail page,use the following code in your theme‚Äôs functions.php file. [code language=”php”] add_filter( ‘woocommerce_output_related_products_args’, ‘sp_related_products_args’ ); function sp_related_products_args( $args ) { $args[‘posts_per_page’] = 4; // 4 related products $args[‘columns’] =… Continue Reading