Skip to content

Instantly share code, notes, and snippets.

@hemraj7171
Created February 27, 2017 11:07
Show Gist options
  • Save hemraj7171/d377864f51e71e39c01f13d67bb6dbb7 to your computer and use it in GitHub Desktop.
Save hemraj7171/d377864f51e71e39c01f13d67bb6dbb7 to your computer and use it in GitHub Desktop.
Add read more button after post excerpt in WordPress
<?php
/**
* Excerpt customization
*/
function wp_excerpt_more( $more ) {
return ' <span>...</span><a class="more-link" href="'. get_permalink() . '">Read More ></a>';
}
add_filter( 'excerpt_more', 'wp_excerpt_more' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment