function mpcth_display_standard_pagination($query) { $big = 999999999; // need an unlikely integer $pagination; $output = ''; $paged = mpcth_get_paged(); echo '<div class="mpcth-pagination">'; $pagination = paginate_links(array('base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), 'current' => max(1, $paged), 'prev_next' => false, 'total' => $query->max_num_pages, 'type' => 'array')); $len = count($pagination); $i = 1; if (!empty($pagination)) { foreach ($pagination as $pag => $value) { if ($i != $len) { $output .= $value . ' <span class="pagination-devider">/</span> '; } else { $output .= $value; } $i++; } } echo $output; echo '</div>'; }
include '../../../../../../wp-load.php'; } else { include '../../../../../../../wp-load.php'; } ob_start(); $offset = (int) $_POST['offset']; $post_type = $_POST['post_type']; $posts_per_page = (int) $_POST['posts_per_page']; $mpcth_settings = $_POST['mpcth_settings']; $customs = isset($_POST['customs']) ? $_POST['customs'] : array(); $blog_compressed = $_POST['blog_compressed']; $modern_meta = $_POST['modern_meta']; if ($blog_compressed) { $modern_meta = false; } $paged = mpcth_get_paged(); $query_conf = array('posts_per_page' => $posts_per_page, 'post_type' => $post_type, 'offset' => $offset, 'post__not_in' => get_option("sticky_posts")); if (!empty($customs)) { foreach ($customs as $key => $value) { $query_conf[$key] = $value; } } $query = new WP_Query(); $query->query($query_conf); if ($query->have_posts()) { while ($query->have_posts()) { $query->the_post(); // get custom post data $post_meta = get_post_custom($post->ID); $post_format = get_post_format(); if ($post_format == '') {