Created
September 19, 2016 12:32
-
-
Save Netzberufler/68720c382ad3210290e00a40fd0e9c5b to your computer and use it in GitHub Desktop.
Read More Button nach Excerpt einfügen
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 | |
/** | |
* Add Read More button to excerpts | |
* | |
* @param string $more_text Excerpt More Text. | |
* @return string | |
*/ | |
function themeslug_excerpt_more( $more_text ) { | |
return '<a href="' . esc_url( get_permalink() ) . '" class="more-link">' . esc_html__( 'Continue reading', 'themeslug' ) . '</a>'; | |
} | |
add_filter( 'excerpt_more', 'themeslug_excerpt_more' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment