Skip to content

Instantly share code, notes, and snippets.

@billerickson
Last active September 27, 2015 20:17
Show Gist options
  • Save billerickson/1325521 to your computer and use it in GitHub Desktop.
Save billerickson/1325521 to your computer and use it in GitHub Desktop.
Customize Read More Link
<?php
/**
* Customize Read More Link
* @author Bill Erickson
* @link http://www.billerickson.net/read-more-link
*
* @param string
* @return string
*/
function be_more_link($more_link) {
return sprintf('</p><p><a href="%s" class="more-link">%s</a>', get_permalink(), 'Read More');
}
add_filter( 'excerpt_more', 'be_more_link' );
add_filter( 'get_the_content_more_link', 'be_more_link' );
add_filter( 'the_content_more_link', 'be_more_link' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment