function bigshop_pagination($per_page, $total) { ?> <div class="well small-padding clearfix"> <?php wpo_pagination($prev = __('Previous', TEXTDOMAIN), $next = __('Next', TEXTDOMAIN), $pages = $blog->max_num_pages, array('class' => 'pull-left pagination-sm')); ?> <?php global $wp_query; ?> <div class="result-count pull-right"> <?php $paged = max(1, $wp_query->get('paged')); $first = $per_page * $paged - $per_page + 1; $last = min($total, $wp_query->get('posts_per_page') * $paged); if (1 == $total) { _e('Showing the single result', 'woocommerce'); } elseif ($total <= $per_page || -1 == $per_page) { printf(__('Showing all %d results', 'woocommerce'), $total); } else { printf(_x('Showing %1$d–%2$d of %3$d results', '%1$d = first, %2$d = last, %3$d = total', 'woocommerce'), $first, $last, $total); } ?> </div> </div> <?php }
?> <?php } ?> </div> <?php } else { ?> <?php get_template_part('templates/none'); ?> <?php } ?> </div> <?php wpo_pagination(); ?> </div> <div class="col-xs-3 wpo-sidebar"> <?php dynamic_sidebar('sidebar-default'); ?> </div> </div> </div> </div> </div> </section> <?php get_footer();
function wpo_pagination_nav($per_page, $total, $max_num_pages = '') { ?> <section class="wpo-pagination"> <?php global $wp_query; ?> <?php wpo_pagination($prev = __('Previous', TEXTDOMAIN), $next = __('Next', TEXTDOMAIN), $pages = $max_num_pages, array('class' => 'pull-left')); ?> <div class="result-count pull-right"> <?php $paged = max(1, $wp_query->get('paged')); $first = $per_page * $paged - $per_page + 1; $last = min($total, $per_page * $paged); if (1 == $total) { _e('Showing the single result', 'woocommerce'); } elseif ($total <= $per_page || -1 == $per_page) { printf(__('Showing all %d results', 'woocommerce'), $total); } else { printf(_x('Showing %1$d to %2$d of %3$d results', '%1$d = first, %2$d = last, %3$d = total', 'woocommerce'), $first, $last, $total); } ?> </div> </section> <?php }