Last active
September 27, 2015 20:17
-
-
Save billerickson/1325521 to your computer and use it in GitHub Desktop.
Customize Read More Link
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 | |
/** | |
* 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