HEX
Server: LiteSpeed
System: Linux premium221.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: madepabj (2566)
PHP: 8.3.26
Disabled: NONE
Upload Files
File: //home/madepabj/hc-cosmetics.com/wp-content/themes/dbea/tpl-paging.php
<?php	
global $wp_query, $wp_rewrite;

// Don't print empty markup if there's only one page.
if ( $wp_query->max_num_pages > 1 ):
	$paged        = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
	$pagenum_link = html_entity_decode( get_pagenum_link() );
	$query_args   = array();
	$url_parts    = explode( '?', $pagenum_link );
	if ( isset( $url_parts[1] ) ) {
		wp_parse_str( $url_parts[1], $query_args );
	}
	$pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
	$pagenum_link = trailingslashit( $pagenum_link ) . '%_%';

	$format  = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
	$format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';

	// Set up paginated links.
	?>
	<nav class="navigation paging-navigation">
		<h4 class="screen-reader-text"><?php esc_html_e( 'Page:', 'dbea' ); ?></h4>
		<div class="pagination loop-pagination">
			<?php 
			echo paginate_links( array(
					'base'     => $pagenum_link,
					'format'   => $format,
					'total'    => $wp_query->max_num_pages,
					'current'  => $paged,
					'mid_size' => 1,
					'add_args' => array_map( 'urlencode', $query_args ),
					'prev_text' => esc_html__( 'Prev', 'dbea' ),
					'next_text' => esc_html__( 'Next', 'dbea' ),
				) );
			?>
		</div><!-- .pagination -->
	</nav><!-- .navigation -->
	<?php
endif;