Created
March 13, 2021 07:38
-
-
Save wplogout/29a4be58d16e3c3266b00b4154757a82 to your computer and use it in GitHub Desktop.
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
add_filter( 'wp_trim_excerpt', 'tu_excerpt_metabox_more' ); | |
function tu_excerpt_metabox_more( $excerpt ) { | |
$output = $excerpt; | |
if ( has_excerpt() ) { | |
$output = sprintf( '%1$s <p class="read-more-button-container"><a class="read-more button" href="%2$s">%3$s</a></p>', | |
$excerpt, | |
get_permalink(), | |
__( 'Read more →', 'generatepress' ) | |
); | |
} | |
return $output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment