Created
April 13, 2020 10:32
-
-
Save wpgaurav/c1b597a49980bc1d8a703171f60176d5 to your computer and use it in GitHub Desktop.
Custom Excerpt for MD theme
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 function new_excerpt_more($more) { | |
global $post; | |
remove_filter('excerpt_more', 'new_excerpt_more'); | |
return ' <a class="read-more" href="'. get_permalink($post->ID) . '">' . 'Read more →' . '</a>'; | |
} | |
add_filter('excerpt_more','new_excerpt_more'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment