'', 'link_before' => '', 'link_after' => '', 'next_or_number' => 'number', 'pagelink' => '%', )); edit_post_link( esc_html__( ' Edit ','multifox' ) ); } add_action( 'multifox_after_single_page_content', 'after_single_page_content_wp_link_pages' ); } if( !function_exists( 'multifox_pagination' ) ) { function multifox_pagination( $query = false, $load_more = false ) { global $wp_query; $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : ( ( get_query_var( 'page' ) ) ? get_query_var( 'page' ) : 1 ); // default $wp_query if( $query ) { $custom_query = $query; } else { $custom_query = $wp_query; } $custom_query->query_vars['paged'] > 1 ? $current = $custom_query->query_vars['paged'] : $current = 1; if( empty( $paged ) ) $paged = 1; $prev = $paged - 1; $next = $paged + 1; $end_size = 1; $mid_size = 2; #$show_all = multifox_get_option( 'showall-pagination' ); $dots = false; if( ! $total = $custom_query->max_num_pages ) $total = 1; $output = ''; if( $total > 1 ) { if( $load_more ){ // ajax load more ------------------------------------------------- if( $paged < $total ){ $output .= '
'; $output .= ''; $output .= ''; $output .= ''. esc_html__('Load more', 'multifox') .''; $output .= ''; $output .= '
'; } } else { // default -------------------------------------------------------- $output .= '
'; $big = 999999999; // need an unlikely integer $args = array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'total' => $custom_query->max_num_pages, 'current' => max( 1, get_query_var('paged') ), #'show_all' => $show_all, 'end_size' => $end_size, 'mid_size' => $mid_size, 'prev_next' => true, 'prev_text' => '', 'next_text' => '', 'type' => 'list' ); $output .= paginate_links( $args ); $output .= '
'."\n"; } } return $output; } }