• Skip to primary navigation
  • Skip to main content

alansari.io

by OMAR AL-ANSARI

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

Modify the read more link in Genesis Framework

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

The below code is to be used to modify the text of “Read More” link in Genesis Framework. Add the code to your theme’s functions.php file.

functions.php
PHP
1
2
3
4
5
6
7
8
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
 
//* Modify the Genesis content limit read more link
add_filter( 'get_the_content_more_link', 'sp_read_more_link' );
function sp_read_more_link() {
   return '<a class="more-link" href="' . get_permalink() . '">Continue Reading →</a>';
}

The above code will change the read more link to “Continue Reading →.” You can change the text in line 4 to whatever text 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