Changing the 'next' and 'previous' page text
-
Hello, i am trying to change the ‘next’ and ‘previous’ text at the bottom of the list of blog posts to say ‘newer’ and ‘older’. I have found the function in content-extensions.php, named function attitude_next_previous(). The problem I am having is that the function is not pluggable so I can’t just copy it into my functions.php and change what I need to change. I have tried removing the function and making a new one but I can’t get it to work. Does anybody know the correct way to do this? For reference, here is the function:
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( __( '« Previous', 'attitude' ) ); ?></li> <li class="next"><?php previous_posts_link( __( 'Next »', 'attitude' ) ); ?></li> </ul> <?php endif; endif; } }
Thanks
- The topic ‘Changing the 'next' and 'previous' page text’ is closed to new replies.