/** * Queries courses * * @access public * @return void */ public static function queryCourses() { global $wp_query; $args = array('post_type' => 'course', 'posts_per_page' => ThemexCore::getOption('courses_per_page', '12'), 'paged' => themex_paged(), 'meta_query' => array(array('key' => '_thumbnail_id'))); if (get_query_var('course_category')) { $args['tax_query'][] = array('taxonomy' => 'course_category', 'field' => 'slug', 'terms' => get_query_var('course_category')); } $order = ThemexCore::getOption('courses_order', 'date'); if (in_array($order, array('rating', 'popularity'))) { $args['orderby'] = 'meta_value_num'; $args['meta_key'] = '_course_' . $order; } query_posts($args); }
/** * Renders pagination * * @access public * @return void */ public static function renderPagination() { global $wp_query; $args['base'] = str_replace(999999999, '%#%', get_pagenum_link(999999999)); $args['total'] = $wp_query->max_num_pages; $args['current'] = themex_paged(); $args['mid_size'] = 5; $args['end_size'] = 1; $args['prev_text'] = ''; $args['next_text'] = ''; $out = paginate_links($args); if ($out != '') { $out = '<nav class="pagination">' . $out . '</nav>'; } echo $out; }
<?php get_header(); ?> <div class="woocommerce"> <?php $woocommerce_loop['single'] = true; $woocommerce_loop['columns'] = 4; $products = array_merge(ThemexShop::$data['products'], array(0)); $limit = intval(themex_value('limit', $_GET, ThemexCore::getOption('products_per_page', 9))); $order = ThemexWoo::getSorting(); query_posts(array('post_type' => 'product', 'post_status' => 'publish', 'paged' => themex_paged(), 'posts_per_page' => $limit, 'post__in' => $products, 'orderby' => $order['orderby'], 'order' => $order['order'], 'meta_key' => $order['meta_key'])); $layout = 'full'; $shop = $post->ID; ThemexWoo::getTemplate('archive-product.php'); ?> </div> <?php get_footer();
<div class="column eightcol"> <?php } else { ?> <div class="fullwidth-section"> <?php } } ?> <?php echo category_description(); ?> <div class="posts-listing popup-container"> <?php if (is_page()) { query_posts(array('post_type' => 'post', 'paged' => themex_paged())); } if (have_posts()) { while (have_posts()) { the_post(); get_template_part('content', 'post'); } } else { ?> <h3><?php _e('No posts found. Try a different search?', 'academy'); ?> </h3> <p><?php _e('Sorry, no posts matched your search. Try again with some different keywords.', 'academy'); ?>
<div class="column eightcol"> <?php } else { ?> <div class="fullcol"> <?php } } ?> <?php echo category_description(); ?> <div class="shops-wrap clearfix"> <?php if (is_page()) { query_posts(array('post_type' => 'shop', 'paged' => themex_paged(), 'posts_per_page' => ThemexCore::getOption('shops_per_page', 6))); } $counter = 0; while (have_posts()) { the_post(); $counter++; ?> <div class="column <?php echo $width; ?> col <?php echo $counter == $columns ? 'last' : ''; ?> "> <?php get_template_part('content', 'shop');