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*

customizing pagination, previous + next page navigation

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #27761
    beth_almeida
    Participant

    I’m trying to customize the order of pages that my previous and next buttons cycle through, and right now it’s using all pages that I’ve created. I can’t find the php file where I can customize the order or to only grab a category — has anyone found this? Help is appreciated!

    #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!

    #28074
    beth_almeida
    Participant

    Thanks so much for your help!

    #28075
    beth_almeida
    Participant

    I was hoping to change the pagination to only pages under a certain category so that it is not including all my pages — is this possible?

    #28116

    Hi beth_almeida,

    This is not possible in our theme. It needs code customization and you need to hire a developer to fix it.

    Thank you!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.