<?php
/**
* WooCommerce Archive Pagination
*
* @package Bootscore
* @version 6.5.0
*/
// Exit if accessed directly
defined('ABSPATH') || exit;
/**
* Custom WooCommerce pagination
*/
function bootscore_wc_pagination() {
$total = wc_get_loop_prop( 'total_pages' );
$current = wc_get_loop_prop( 'current_page' );
$base = esc_url_raw( str_replace( 999999999, '%#%', remove_query_arg( 'add-to-cart', get_pagenum_link( 999999999, false ) ) ) );
$format = '';
if ( $total <= 1 ) {
return;
}
?>
<nav aria-label="<?php esc_attr_e( 'Product Pagination', 'woocommerce' ); ?>">
<?php
$paginate_links = paginate_links(
apply_filters(
'woocommerce_pagination_args',
array(
'base' => $base,
'format' => $format,
'add_args' => false,
'current' => max( 1, $current ),
'total' => $total,
'prev_text' => '«',
'next_text' => '»',
'type' => 'array',
'end_size' => 1,
'mid_size' => 1,
)
)
);
if ( is_array( $paginate_links ) ) {
?>
<ul class="pagination justify-content-center">
<?php
foreach ( $paginate_links as $paginate_link ) {
// Check if this is the current page.
$is_current = str_contains( $paginate_link, 'current' );
// Replace 'page-numbers' with 'page-link' and remove 'current'.
$paginate_link = str_replace(
array( 'page-numbers', 'current' ),
array( 'page-link', '' ),
$paginate_link
);
?>
<li class="page-item<?php echo $is_current ? ' active' : ''; ?>">
<?php echo wp_kses_post( $paginate_link ); ?>
</li>
<?php
}
?>
</ul>
<?php
}
?>
</nav>
<?php
}
// Remove default WooCommerce pagination
remove_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 );
// Add custom pagination
add_action( 'woocommerce_after_shop_loop', 'bootscore_wc_pagination', 10 );
| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| blocks/ | 2026-11-26 08:19 | 6.91 KB | 76129f60960:kunden | dxwrx-rx-r | |
| ajax-cart.php | 2026-11-26 08:19 | 19.38 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-ajax-login.php | 2026-11-26 08:19 | 4.68 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-breadcrumb.php | 2026-11-26 08:19 | 6.83 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-cart.php | 2026-11-26 08:19 | 1.35 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-deprecated.php | 2026-11-26 08:19 | 1.47 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-enqueue.php | 2026-11-26 08:19 | 2.17 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-forms.php | 2026-11-26 08:19 | 1.5 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-loop.php | 2026-11-26 08:19 | 3.82 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-mini-cart.php | 2026-11-26 08:19 | 1.35 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-pagination.php | 2026-11-26 08:19 | 2.05 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-qty-btn.php | 2026-11-26 08:19 | 3.43 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-redirects.php | 2026-11-26 08:19 | 1.59 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-result-count.php | 2026-11-26 08:19 | 1.21 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-sale-flash.php | 2026-11-26 08:19 | 491 B | 76129f60960:kunden | -xw-x--x-- | |
| wc-setup.php | 2026-11-26 08:19 | 608 B | 76129f60960:kunden | -xw-x--x-- | |
| wc-single-product-reviews.php | 2026-11-26 08:19 | 2.78 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-skip-cart.php | 2026-11-26 08:19 | 1.25 KB | 76129f60960:kunden | -xw-x--x-- | |
| wc-stock-badge.php | 2026-11-26 08:19 | 706 B | 76129f60960:kunden | -xw-x--x-- | |
| wc-tabs.php | 2026-11-26 08:19 | 3.02 KB | 76129f60960:kunden | -xw-x--x-- | |