Created
October 11, 2012 15:16
-
-
Save jeremyboggs/3873149 to your computer and use it in GitHub Desktop.
Filters 'excerpt_more' in WordPress to provide a 'Continue reading' link. Add to your theme's functions.php file.
This file contains hidden or 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 | |
/** | |
* Filters 'excerpt_more' to provide a 'Continue reading' link. | |
*/ | |
function custom_excerpt_more($more) { | |
global $post; | |
$more = '…. <a href="'. get_permalink($post->ID) . '">Continue reading.</a>'; | |
return $more; | |
} | |
add_filter('excerpt_more', 'custom_excerpt_more'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment