/var/www/html_us/wp-content/themes/elessi-theme/woocommerce/loop/result-count.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php

/**
 * Result Count.
 *
 * @author  NasaTheme
 * @package Elessi-theme/WooCommerce
 * @version 9.4.0
 */
if (!defined('ABSPATH')) :
    exit; 
// Exit if accessed directly
endif;
?>

<p class="woocommerce-result-count"<?php echo (empty($orderedby) || === intval($total)) ? '' ' role="alert" aria-relevant="all" data-is-sorted-by="true"'?>>
    <?php
    
if ($total <= $per_page || -=== $per_page) :
        echo 
$total == sprintf(esc_html__('%s result''elessi-theme'), $total) : sprintf(esc_html__('%s results''elessi-theme'), $total);
    else :
        
$first = ($per_page $current) - $per_page 1;
        
$last min($total$per_page $current);
        
$total $last $first 1;
        
        echo 
$total == sprintf(esc_html__('%s result''elessi-theme'), $total) : sprintf(esc_html__('%s results''elessi-theme'), $total);
        
        
// $first = ($per_page * $current) - $per_page + 1;
        // $last  = min($total, $per_page * $current);
        
        // printf(_nx('%1$d&ndash;%2$d of %3$d result', '%1$d&ndash;%2$d of %3$d results', $total, 'with first and last result', 'elessi-theme'), $first, $last, $total);
    
endif;
    
?>
</p>