Receives max_items_number parameter from args in related items function.
This commit is contained in:
parent
d8e27cf46a
commit
05f690c612
|
@ -1226,6 +1226,9 @@ class Theme_Helper {
|
|||
if ( isset($args['order']) )
|
||||
$related_items_query_args['order'] = $args['order'];
|
||||
|
||||
if ( isset($args['max_items_number']) )
|
||||
$related_items_query_args['posts_per_page'] = $args['max_items_number'];
|
||||
|
||||
$related_items = $item->get_related_items($related_items_query_args);
|
||||
if (!count($related_items))
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue