generate_content_more_link_output

The generate_content_more_link_output filter allows you to change the HTML markup of your read more link inside your blog post excerpts when using the more tag.

Default:

sprintf( '<p class="read-more-container"><a title="%1$s" class="read-more content-read-more" href="%2$s">%3$s</a></p>',
	the_title_attribute( 'echo=0' ),
	esc_url( get_permalink( get_the_ID() ) . apply_filters( 'generate_more_jump','#more-' . get_the_ID() ) ),
	__( 'Read more', 'generatepress' )
);

Usage

For example, if we wanted to change the class of our paragraph surrounding the link, we could do this:

add_filter( 'generate_content_more_link_output','tu_change_content_more_link' );
function tu_change_content_more_link() {
    return sprintf( '<p class="read-more-container MY-CUSTOM-CLASS"><a title="%1$s" class="read-more content-read-more" href="%2$s">%3$s</a></p>',
        the_title_attribute( 'echo=0' ),
        esc_url( get_permalink( get_the_ID() ) . apply_filters( 'generate_more_jump','#more-' . get_the_ID() ) ),
        __( 'Read more', 'generatepress' )
    );
}