max_num_pages < 2 ) { return; } ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } // Retrieve prev/next text from theme options with fallback $prev_text = tx_get_option( 'prev-post-text', esc_html__( 'Previous Post', 'avas' ) ); $next_text = tx_get_option( 'next-post-text', esc_html__( 'Next Post', 'avas' ) ); ?> max_num_pages; if(!$numpages) { $numpages = 1; } } /** * We construct the pagination arguments to enter into our paginate_links * function. */ $prev_arrow = is_rtl() ? '' : ''; $next_arrow = is_rtl() ? '' : ''; $pagination_args = array( 'base' => get_pagenum_link(1) . '%_%', 'format' => 'page/%#%', 'total' => $numpages, 'current' => $paged, 'show_all' => False, 'end_size' => 1, 'mid_size' => $pagerange, 'prev_next' => true, 'prev_text' => $prev_arrow, 'next_text' => $next_arrow, 'type' => 'plain', 'add_args' => false, 'add_fragment' => '' ); $paginate_links = paginate_links($pagination_args); if ($paginate_links) { echo ""; } } endif; /* --------------------------------------------------------- EOF ------------------------------------------------------------ */