Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomollet committed Jul 25, 2017
1 parent b6f31b7 commit 1c77b24
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ Addthis share buttons:

Customize the admin scheme: https://gist.github.com/nicomollet/7fd3e2e5334ef352abe0

Shortcodes
-----------
[woocommerce_cart_link] Display a link to the Woocommerce cart

Major components
-----------
Expand Down
13 changes: 13 additions & 0 deletions inc/plugins/woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,3 +463,16 @@ function woocommerce_cart_count_shortcode( $atts ) {
}
add_shortcode( 'woocommerce_cart_link', 'woocommerce_cart_count_shortcode' );

/**
* Woocommerce: Related products number
*
* @param $args
*
* @return mixed
*/
function stormbringer_related_products_args( $args ) {
$args['posts_per_page'] = 3; // 3 related products
$args['columns'] = 3; // arranged in 3 columns
return $args;
}
add_filter( 'woocommerce_output_related_products_args', 'stormbringer_related_products_args' );

0 comments on commit 1c77b24

Please sign in to comment.