Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
GeneratePress read more link on blog post archive, as seen on
add_filter( 'wp_trim_excerpt', 'tu_excerpt_metabox_more' );
function tu_excerpt_metabox_more( $excerpt ) {
$output = $excerpt;
$settings = wp_parse_args(
get_option( 'generate_blog_settings', array() ),
if ( has_excerpt() ) {
$output = sprintf('%1$s <br /><a class="read-more" href="%2$s">%3$s →</a>',
wp_kses_post( $settings['read_more'] )
return $output;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment