Read more button open in new tab

info1841
6 Posts
info1841 posted this 05 March 2019

I use WordPress in the current version. The Read more button opens the post in the same tab. I want the post to open in a new tab (target = "_ blank"). Can I set this somewhere? Or do you know a code snippet that I can insert into the CMS code field so that clicking on the Read more button will open the post in a new tab? Same problem I have with the Featured Image Link. Hope you can help me.

I use WordPress in the current version. The Read more button opens the post in the same tab. I want the post to open in a new tab (target = "_ blank"). Can I set this somewhere? Or do you know a code snippet that I can insert into the CMS code field so that clicking on the Read more button will open the post in a new tab? Same problem I have with the Featured Image Link. Hope you can help me.
Vote to pay developers attention to this features or issue.
3 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 11 March 2019

Hello Thomas,
1) in wp-admin go to Appearance -> Editor, open "templates" folder and check the file name for blog. On my screenshot it is blog_5:

blog-5.png

You don't need to edit this file, just to know its name.

2) then check "includes" folder and open the file with the same same (e.g. blog_5.php):

includes-blog-5.png

3) In this file find the line:

 <a class="bd-postreadmore-6 bd-button "   title="<?php echo strip_tags('Continue reading...') ?>" href="<?php echo get_permalink($post->ID) ?>"><?php _e('Continue reading...', 'default'); ?></a>

4) Add target="_blank" right after

continue-reading.png

Gina
Themler Support

Hello Thomas, 1) in wp-admin go to Appearance -> Editor, open "templates" folder and check the file name for blog. On my screenshot it is blog_5: !blog-5.png! You don't need to edit this file, just to know its name. 2) then check "includes" folder and open the file with the same same (e.g. blog_5.php): !includes-blog-5.png! 3) In this file find the line: <a class="bd-postreadmore-6 bd-button " title="<?php echo strip_tags('Continue reading...') ?>" href="<?php echo get_permalink($post->ID) ?>"><?php _e('Continue reading...', 'default'); ?></a> 4) Add `target="_blank"` right after <a !continue-reading.png! Gina Themler Support
info1841
6 Posts
info1841 posted this 12 March 2019

Thank you Gina! Works well.
What if I work on the theme in Themler and then save it? Will my change in the blog_5.php then get or do I have to change that every time?
What about the link from Featured Image? Can this link to the post also be set to target_ "blank"?

Thank you Gina! Works well. What if I work on the theme in Themler and then save it? Will my change in the blog_5.php then get or do I have to change that every time? What about the link from Featured Image? Can this link to the post also be set to target_ "blank"?
Support Team
Support Team posted this 12 March 2019

The changes will be lost if you e-publish the theme from Themler, I am afraid.
As for the featured image, it is not linked so making it a link that opens in new tab would require much more coding. We don't support such modifications. There are a lot of plugins for featured images, maybe some of them will work with Themler and provide you the functionality you are looking for, this would help eiminate manual coding.

Gina
Themler Support

The changes will be lost if you e-publish the theme from Themler, I am afraid. As for the featured image, it is not linked so making it a link that opens in new tab would require much more coding. We don't support such modifications. There are a lot of plugins for featured images, maybe some of them will work with Themler and provide you the functionality you are looking for, this would help eiminate manual coding. Gina Themler Support
You must log in or register to leave comments