From 2cf72d74b6730368f485f30188a233481a9723a6 Mon Sep 17 00:00:00 2001 From: Mikey Binns <38146638+mikeybinns@users.noreply.github.com> Date: Thu, 10 Sep 2026 09:22:13 +0100 Subject: [PATCH] update pagination dots to not show dots if not needed --- src/wp-includes/general-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 0e35894fd47c4..3cf4c5aca66bc 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -5069,7 +5069,7 @@ function paginate_links( $args = '' ) { $dots = true; else : - if ( $args['show_all'] || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size ) ) : + if ( $args['show_all'] || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size || ( ( in_array( $current, array( 1, $total ), true ) ) && $total - ( $mid_size + ( $end_size * 2 ) ) ) === 1 ) ) : $link = str_replace( '%_%', 1 === $n ? '' : $args['format'], $args['base'] ); $link = str_replace( '%#%', $n, $link ); if ( $add_args ) {