update pagination links

This commit is contained in:
Evan Mullins 2022-11-07 11:44:05 -05:00
parent c0566bab1e
commit d9ab04484f
2 changed files with 3 additions and 6 deletions

View file

@ -5,7 +5,7 @@
Author: Evan Mullins
Author URI: https://circlecube.com
Template: twentynineteen
Version: 1.10.3
Version: 1.10.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wasmo

View file

@ -195,8 +195,9 @@ if ( false === ( $the_directory = get_transient( $transient_name ) ) ) {
}
$the_directory .= '</div>';
if ( 'full' === $context && $total_users > $max_profiles ) {
$big = 999999;
$pl_args = array(
'base' => add_query_arg('paged','%#%', get_page_link() ),
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '',
'total' => ceil($total_users / $max_profiles),
'current' => max(1, $paged),
@ -204,10 +205,6 @@ if ( false === ( $the_directory = get_transient( $transient_name ) ) ) {
'type' => 'list',
);
// for ".../page/n"
if($GLOBALS['wp_rewrite']->using_permalinks()) {
$pl_args['base'] = user_trailingslashit(trailingslashit(get_pagenum_link(1)).'page/%#%/', 'paged');
}
$the_directory .= '<div class="directory-pagination">' . paginate_links($pl_args) . '</div>';
}
$the_directory .= '</section>';