Hi, I’m using this code to modify excerpts:
add_filter( 'wp_trim_excerpt', 'tu_excerpt_metabox_more' );
function tu_excerpt_metabox_more( $excerpt ) {
$output = $excerpt;
if ( has_excerpt() ) {
$output = sprintf( '%1$s <p class="read-more-container"><a class="read-more button" href="%2$s">%3$s</a></p>',
$excerpt,
get_permalink(),
__( 'Read more', 'generatepress' )
);
}
return $output;
}
Is there a way to target this just on the blog page, eg
if ( has_excerpt() && is_front_page() )
?