GeneratePress: Remove Excerpts From Archives

Some bloggers prefer to not have excerpts on the archive pages. While Generatepress is a great theme for bloggers, unfortunately even when you set the excerpt length to 0 in the customizer, the ‘read more’ link or button remains there.

With this little piece of code you can easily remedy that.

// Archive pages: Remove 'read more' link 
 function tu_custom_more_tag( $more ) {
     global $wp_query; // assuming you are using the main query
     return '';
 }
 add_filter( 'excerpt_more', 'tu_custom_more_tag', 100 );

Before you add the code snippet your archive page looks like this:

Remove excerpt read more link before

And after you add the code snippet, it will look like this:

Remove excerpt read more link after