badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Reply To: customizing pagination, previous + next page navigation

#27769

Hi analytic_header,

First of all we recommended you not to customize the code. If you customize the code then while udpating to our new version all your customized code will be lost. So you need to create a child theme and then customize the code.

The previous and next buttons cycle is from theme folder ambition -> inc -> structure -> content-extension.php on line no 417 you will find this function code

add_action( 'ambition_after_loop_content', 'ambition_next_previous', 5 );
/**
 * Shows the next or previous posts
 */
function ambition_next_previous() {
	if( is_archive() || is_home() || is_search() ) {
		/**
		 * Checking WP-PageNaviplugin exist
		 */
		if ( function_exists('wp_pagenavi' ) ) :
			wp_pagenavi();
		else: 
			global $wp_query;
			if ( $wp_query->max_num_pages > 1 ) : ?>
				<ul class="default-wp-page clearfix">
					<li class="previous">
						<?php next_posts_link( __( '&laquo; Previous', 'ambition' ) ); ?>
					</li>
					<li class="next">
						<?php previous_posts_link( __( 'Next &raquo;', 'ambition' ) ); ?>
					</li>
				</ul>
			<?php
			endif;
		endif;
	}
}

Thank you!