Skip to content

Instantly share code, notes, and snippets.

@terrytsang
Last active September 11, 2022 09:57
Show Gist options
  • Save terrytsang/a6d49b49e69d9a1754b6cf0c46a4dbb5 to your computer and use it in GitHub Desktop.
Save terrytsang/a6d49b49e69d9a1754b6cf0c46a4dbb5 to your computer and use it in GitHub Desktop.
Change Read More Text to Continue Reading for Excerpts
<?php
// add this code into your theme functions.php file
function tt_change_excerpt_readmore_text( $more ){
global $post;
return '&hellip; <a class="read-more" href="'.get_permalink($post->ID).'" title="'.esc_attr(get_the_title($post->ID)).'">'.'Continue Reading &raquo;'.'</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