Last active
April 13, 2018 13:54
-
-
Save adambradford/a8e8d29ca5f5ef623bb9fbf21540d7b7 to your computer and use it in GitHub Desktop.
Customise the ‘read more’ text in a WordPress site built with the Genesis Framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Add this to your functions.php file. Do NOT include the opening php tag | |
//* Customise the 'read more' text | |
add_filter( 'excerpt_more', 'genesis_read_more_link' ); | |
add_filter( 'get_the_content_more_link', 'genesis_read_more_link' ); | |
add_filter( 'the_content_more_link', 'genesis_read_more_link' ); | |
function genesis_read_more_link() { | |
return '<a class="more-link" href="' . get_permalink() . '">[Read more...]</a>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment