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*

Change Next/Previous buttons on front page

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #22294
    Daniel
    Participant

    Hello,

    Is it possible to change Next to ‘Newer News’ and Previous to ‘Older News’ on the buttons at the bottom of the front (excerpts) page?

    I have a custom functionality plugin running if that helps?

    Thanks,

    Dan

    #22391

    hi Daniel,

    Yes you can but it needs code customization. The file is inside theme folder-> inc-> structure->content-extension.php on line no 759 and 783 you will find the following code

    add_action( 'attitude_after_loop_content', 'attitude_next_previous', 5 );
    /**
     * Shows the next or previous posts
     */
    function attitude_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', 'attitude' ) ); ?></li>
    				<li class="next"><?php previous_posts_link( __( 'Next &raquo;', 'attitude' ) ); ?></li>
    			</ul>
    			<?php
    			endif;
    		endif;
    	}
    }

    Replace Previous and Next as you want. We recommended you to create a child theme before making any changes on it. First unhook the function and then only customize the code. We have already replied how to unhook the functions too in forum.

    Thank you!

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