Last active
September 11, 2022 09:57
-
-
Save terrytsang/a6d49b49e69d9a1754b6cf0c46a4dbb5 to your computer and use it in GitHub Desktop.
Change Read More Text to Continue Reading for Excerpts
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 | |
// add this code into your theme functions.php file | |
function tt_change_excerpt_readmore_text( $more ){ | |
global $post; | |
return '… <a class="read-more" href="'.get_permalink($post->ID).'" title="'.esc_attr(get_the_title($post->ID)).'">'.'Continue Reading »'.'</a>'; | |
} | |
add_filter('excerpt_more', 'tt_change_excerpt_readmore_text'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment