Created
January 5, 2019 09:08
-
-
Save Tsunamijaan/7d82e172bb6eca79474fea2b6aa38ab1 to your computer and use it in GitHub Desktop.
To add read more link after post excerpt
This file contains hidden or 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( '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