Created
August 15, 2018 16:54
-
-
Save kimcoleman/6edacea2865cee9ab0050987825e6e80 to your computer and use it in GitHub Desktop.
Add a (more...) link when you specify a manual except to a post using the "Excerpt" post meta box.
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 an excerpt more string to manually created excerpts. | |
*/ | |
function my_memberlite_manual_excerpt_more( $excerpt ) { | |
$excerpt_more = ''; | |
if ( has_excerpt() ) { | |
$excerpt_more = ' <a href="' . get_permalink( ) . '" rel="nofollow">(more...)</a></a>'; | |
} | |
return $excerpt . $excerpt_more; | |
} | |
add_filter( 'get_the_excerpt', 'my_memberlite_manual_excerpt_more' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment