Receives max_items_number parameter from args in related items function.

This commit is contained in:
mateuswetah 2023-06-05 09:14:17 -03:00
parent d8e27cf46a
commit 05f690c612
1 changed files with 4 additions and 1 deletions

View File

@ -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;