Skip to content

Instantly share code, notes, and snippets.

@adambradford
Last active April 13, 2018 13:54
Show Gist options
  • Save adambradford/a8e8d29ca5f5ef623bb9fbf21540d7b7 to your computer and use it in GitHub Desktop.
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
<?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