From 0c4a0d18f40540a4506729fc18882cf643ed4d1c Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 5 Sep 2026 12:32:09 +0800 Subject: [PATCH] fix(widgets): keep found rows for term aggregation post count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The aggregation card's N篇文章 meta reads found_posts, but paginate '' disables SQL_CALC_FOUND_ROWS and found_posts comes back 0 on current WordPress. The reference shows the term's total post count, so keep found rows enabled for this internal query. --- inc/helpers/aksrt-widgets-markup.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/helpers/aksrt-widgets-markup.php b/inc/helpers/aksrt-widgets-markup.php index 0cdd1a0c..1741b370 100644 --- a/inc/helpers/aksrt-widgets-markup.php +++ b/inc/helpers/aksrt-widgets-markup.php @@ -235,7 +235,9 @@ if (!function_exists('aksrt_widget_term_aggregation')) : 'orderby' => (string) $args['orderby'], 'order' => strtoupper((string) $args['order']) === 'ASC' ? 'ASC' : 'DESC', 'count' => max(1, (int) $args['count']), - 'paginate' => '', + // The reference shows the term's total post count, so found rows + // must stay enabled (paginate '' would disable them). + 'paginate' => 'number', ]; $query = \AKSRT\WidgetSystem\PostQuery::build($query_args, 1, []);