• Skip to primary navigation
  • Skip to main content

alansari.io

by OMAR AL-ANSARI

  • Home
  • About
  • Portfolio
  • Blog
  • Code
  • Contact

Customize the Next/Previous Page text in Genesis Framework

May 18, 2016 by Omar Al-Ansari Leave a Comment

The below code is to be used to modify the text of “Next Page” and “Previous Page” links in Genesis Framework. Add the code to your theme’s functions.php file.

functions.php
PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
 
//* Customize the next page link
add_filter ( 'genesis_next_link_text' , 'sp_next_page_link' );
  function sp_next_page_link ( $text ) {
    return 'Next Page →';
}
 
//* Customize the previous page link
add_filter ( 'genesis_prev_link_text' , 'sp_previous_page_link' );
  function sp_previous_page_link ( $text ) {
    return '← Previous Page';
}

The above code will change the “Next Page” and “Previous Page” to “Next Page →” and “← Previous Page” respectively. You can change the text in lines 4 and 10 to whatever you like.

Sources:
  • Studio Press

Filed Under: Code Snippets Tagged With: Snippets

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Twitter
  • Facebook
  • YouTube
  • GitHub

Copyrights © 2016–2021 · alansari.io · Proudly powered by WordPress and Genesis Framework