diff --git a/src/classes/repositories/class-tainacan-metadata.php b/src/classes/repositories/class-tainacan-metadata.php index 77072018f..ced53c929 100644 --- a/src/classes/repositories/class-tainacan-metadata.php +++ b/src/classes/repositories/class-tainacan-metadata.php @@ -1031,7 +1031,7 @@ class Metadata extends Repository { } $total = $wpdb->get_var($total_query); - $number = is_integer($number) && $number >=1 ? $number : $total; + $number = is_integer($args['number']) && $args['number'] >=1 ? $args['number'] : $total; if( $number < 1){ $pages = 1; } else { @@ -1092,7 +1092,7 @@ class Metadata extends Repository { $results = $wpdb->get_col($query); $total = $wpdb->get_var($total_query); - $number = is_integer($number) && $number >=1 ? $number : $total; + $number = is_integer($args['number']) && $args['number'] >=1 ? $args['number'] : $total; if( $number < 1){ $pages = 1; } else {