public function the_pagination() { $base = ap_get_link_to('users') . '/%_%'; ap_pagination($this->paged, $this->total_pages, $base); }
<div id="ap-user-favorites"> <?php if ($question->have_posts()) { ?> <div class="question-list"> <?php /* Start the Loop */ while ($question->have_posts()) { $question->the_post(); include ap_get_theme_location('content-list.php'); } ?> </div> <?php ap_pagination('', 2, $paged, $question); ?> <?php } else { _e('No favourite questions', 'ap'); } ?> </div>
public function the_pagination() { $base = ap_user_link($this->args['user_id'], 'notification') . '/%_%'; ap_pagination($this->paged, $this->total_pages, $base); }
ap_ask_btn(get_the_ID()); ?> </h1> <div id="ap-lists" class="clearfix"> <?php ap_questions_tab(get_permalink()); ?> <?php if ($questions->have_posts()) { ?> <div class="question-list"> <?php /* Start the Loop */ while ($questions->have_posts()) { $questions->the_post(); global $post; include ap_get_theme_location('content-list.php'); } ?> </div> <?php ap_pagination(); ?> <?php } else { include ap_get_theme_location('content-none.php'); } ?> </div>
<span class="ap-about-rep-label"><?php _e('Total', 'ap'); ?> </span> <span class="ap-about-rep-count"><?php ap_user_the_reputation(); ?> </span> </div> <div class="ap-about-rep-chart"> <span data-action="ap_chart" data-type="bar" data-peity='{"fill" : ["#8fc77e"], "height": 45, "width": "100%"}'><?php echo ap_user_get_28_days_reputation(); ?> </span> </div> <div class="ap-user-rep"> <?php if (ap_has_reputations()) { while (ap_reputations()) { ap_the_reputation(); ap_get_template_part('user/reputation-content'); } ap_pagination(false, anspress()->reputations->total_pages); } else { _e('No reputation earned yet.', 'ap'); } ?> </div> </div> </div>
<div id="ap-user-answer"> <div id="answers-c"> <?php if ($answer->have_posts()) { ?> <?php ap_ans_list_tab(); ?> <div id="answers"> <?php while ($answer->have_posts()) { $answer->the_post(); include ap_get_theme_location('answer-list.php'); } ?> </div> <?php ap_pagination('', 2, $paged, $answer); ?> <?php } else { _e('No answers posted yet.', 'ap'); } ?> </div> </div>
/** * output answers pagination */ function ap_answers_the_pagination() { global $answers; ap_pagination(false, $answers->max_num_pages); }
function ap_get_all_users() { $paged = get_query_var('paged') ? get_query_var('paged') : 1; $per_page = ap_opt('tags_per_page'); $total_terms = wp_count_terms('question_tags'); $offset = $per_page * ($paged - 1); $args = array('number' => $per_page, 'offset' => $offset); $users = get_users($args); echo '<ul class="ap-tags-list">'; foreach ($users as $key => $user) { echo '<li>'; echo $user->display_name; echo '</li>'; } echo '</ul>'; ap_pagination(ceil($total_terms / $per_page), $range = 1, $paged); }
<div id="ap-lists" class="clearfix"> <?php if ($answers->have_posts()) { ?> <div class="question-list"> <?php /* Start the Loop */ while ($answers->have_posts()) { $answers->the_post(); global $post; include ap_get_theme_location('answer-list.php'); } ?> </div> <?php ap_pagination(false, $answers->max_num_pages); ?> <?php } else { include ap_get_theme_location('content-none.php'); } ?> </div>
/** * output questions page pagination * @return string pagination html tag */ function ap_questions_the_pagination() { $questions = anspress()->questions; ap_pagination(false, $questions->max_num_pages); }
/** * output questions page pagination * @return string pagination html tag */ function ap_questions_the_pagination() { global $questions; ap_pagination(false, $questions->max_num_pages); }
/** * output answers pagination * @return string pagination html tag */ function ap_answers_the_pagination() { $answers = anspress()->answers; ap_pagination(false, $answers->max_num_pages); }
public function the_pagination($base = false) { if (false === $base) { $base = ap_get_link_to('activity') . '/%_%'; } ap_pagination($this->paged, $this->total_pages, $base); }
function ap_answers_list($question_id, $order = 'voted') { $paged = get_query_var('paged') ? get_query_var('paged') : 1; if (is_question()) { $order = get_query_var('sort'); if (empty($order)) { $order = ap_opt('answers_sort'); } } if ($order == 'voted') { $ans_args = array('ap_query' => 'answer_sort_voted', 'post_type' => 'answer', 'post_status' => 'publish', 'post_parent' => get_the_ID(), 'showposts' => ap_opt('answers_per_page'), 'paged' => $paged, 'orderby' => 'meta_value_num', 'meta_key' => ANSPRESS_VOTE_META, 'meta_query' => array('relation' => 'OR', array('key' => ANSPRESS_BEST_META, 'compare' => '=', 'value' => '1'), array('key' => ANSPRESS_BEST_META, 'compare' => 'NOT EXISTS'))); } elseif ($order == 'oldest') { $ans_args = array('ap_query' => 'answer_sort_newest', 'post_type' => 'answer', 'post_status' => 'publish', 'post_parent' => get_the_ID(), 'showposts' => ap_opt('answers_per_page'), 'paged' => $paged, 'orderby' => 'meta_value date', 'meta_key' => ANSPRESS_BEST_META, 'order' => 'ASC', 'meta_query' => array('relation' => 'OR', array('key' => ANSPRESS_BEST_META, 'compare' => 'NOT EXISTS'))); } else { $ans_args = array('ap_query' => 'answer_sort_newest', 'post_type' => 'answer', 'post_status' => 'publish', 'post_parent' => get_the_ID(), 'showposts' => ap_opt('answers_per_page'), 'paged' => $paged, 'orderby' => 'meta_value date', 'meta_key' => ANSPRESS_BEST_META, 'order' => 'DESC', 'meta_query' => array('relation' => 'OR', array('key' => ANSPRESS_BEST_META, 'compare' => 'NOT EXISTS'))); } $ans_args = apply_filters('ap_answers_query_args', $ans_args); $ans = new WP_Query($ans_args); // get answer sorting tab echo '<div id="answers-c">'; ap_ans_tab(); echo '<div id="answers">'; while ($ans->have_posts()) { $ans->the_post(); include ap_get_theme_location('answer.php'); } echo '</div>'; ap_pagination('', 2, $paged, $ans); echo '</div>'; wp_reset_query(); }