Search for: Log In Free Support [Resolved] Read More link open in new tab Home › Forums › Support › Read More link open in new tab This topic has 3 replies, 2 voices, and was last updated 4 months, 3 weeks ago by David. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts October 16, 2020 at 10:46 pm #1492783 Joyce Hi Team, How can I open ‘read more’ link in new tab, I modified the following files but after plugin upgrade, I have to re-apply the same change. Is there a better way to handle this? All links on my website need to open in new tab. /plugins/gp-premium/blog/functions/generate-blog.php <a title="%1$s" class="read-more" href="%2$s" aria-label="%4$s" target="_blank">%3$s</a> Thanks, Joyce October 17, 2020 at 2:14 am #1492884 DavidStaff Customer Support Hi there, add this PHP Snippet to your site: add_filter( 'generate_excerpt_more_output','lh_change_read_more' ); function lh_change_read_more() { return sprintf( ' ... <a class="read-more" title="%1$s" href="%2$s" target="_blank">%3$s</a>', the_title_attribute( 'echo=0' ), esc_url( get_permalink( get_the_ID() ) ), __( 'Read more', 'generatepress' ) ); } This article explains adding PHP: https://docs.generatepress.com/article/adding-php/ Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ October 17, 2020 at 3:11 am #1492917 Joyce Thanks David, I added it to child theme functions.php and it works fine October 17, 2020 at 4:00 am #1492956 DavidStaff Customer Support Glad to hear that Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In