Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Tsunamijaan/7d82e172bb6eca79474fea2b6aa38ab1 to your computer and use it in GitHub Desktop.

Select an option

Save Tsunamijaan/7d82e172bb6eca79474fea2b6aa38ab1 to your computer and use it in GitHub Desktop.
To add read more link after post excerpt
add_filter( 'excerpt_more', 'excerpt_more_example' );
function excerpt_more_example( $text ) {
global $post;
return '... <a class="read-more-link" href="' . get_permalink( $post->ID ) . '">Read more</a>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment