Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Read More Button nach Excerpt einfügen
<?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