<?php /** * Pagination * * @author WooThemes * @package WooCommerce/Templates * @version 2.2.2 */ global $wp_query; ?> <?php if ($wp_query->max_num_pages > 1) { if (function_exists('yit_pagination')) { yit_pagination(); } else { ?> <div class="navigation"> <div class="nav-next"><?php next_posts_link(__('Next <span class="meta-nav">→</span>', 'yit')); ?> </div> <div class="nav-previous"><?php previous_posts_link(__('<span class="meta-nav">←</span> Previous', 'yit')); ?> </div> </div> <?php } ?>
<?php /** * Pagination * * @author WooThemes * @package WooCommerce/Templates * @version 1.6.4 */ global $wp_query; ?> <?php if ( $wp_query->max_num_pages > 1 ) : if( function_exists( 'yit_pagination' ) ) : yit_pagination(); else : ?> <div class="navigation"> <div class="nav-next"><?php next_posts_link( __( 'Next <span class="meta-nav">→</span>', 'yit' ) ); ?></div> <div class="nav-previous"><?php previous_posts_link( __( '<span class="meta-nav">←</span> Previous', 'yit' ) ); ?></div> </div> <?php endif ?> <?php endif; ?>
/** * Print the pagination of the portfolio * * @since 1.0.0 */ public function get_pagination($pages = false) { if (!$pages && isset($this->shortcode_atts['posts_per_page'])) { $nitems = $this->_thePortfolioObj->get_number_items($this->_current_portfolio); $posts_per_page = $this->shortcode_atts['posts_per_page']; if ($posts_per_page <= 0) { return; } $pages = ceil($nitems / $posts_per_page); } yit_pagination($pages); }
while ($products->have_posts()) { $products->the_post(); ?> <?php if (function_exists('wc_get_template_part')) { wc_get_template_part('content', 'product'); } else { woocommerce_get_template_part('content', 'product'); } ?> <?php } // end of the loop. ?> </ul> </div> <div class="clear"></div> <?php if ($pagination == 'yes') { yit_pagination($products->max_num_pages); } ?> <?php } wp_reset_query(); $woocommerce_loop['loop'] = 0;
/** * Print pagination * * @return void * @since 1.0.0 * @author Antonio La Rocca <*****@*****.**> */ public function pagination() { $pages = isset($this->query->max_num_pages) ? $this->query->max_num_pages : ''; yit_pagination($pages); }