Last active
December 21, 2015 21:09
-
-
Save AMNDesign/6366541 to your computer and use it in GitHub Desktop.
Add a "read more" link after both manual excerpts and regular excerpts in WordPress.
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 | |
//* Add read more link after both manual excerpts and regular excerpts | |
add_filter('the_excerpt', 'amn_manual_excerpt_read_more_link'); | |
function amn_manual_excerpt_read_more_link($output) { | |
global $post; | |
return substr($output,0,-5).'... <a href="' . get_permalink($post->ID) . '">Read More</a>.</p>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment