Learn IT Online free
We respect your privacy
Hi Helena here. My goal is to provide Clear, Concise tutorials and articles to combat information-overload and help time-conscious, busy people get things done asap. Therefore, as much as possible, NetWebbing is meant for anyone who just wants technical things in as easy, layman terms as possible. More ...
Comment Author link to Open in New Window
Comment Author link in WordPress, by default, opens up in the SAME WINDOW. That is such a No-No! Your visitors leave your site as soon as they click the Comment Author’s link!
Comment Author’s link – outgoing to his site
This was brought to my attention when I received my first (lovely) comment from Jupiter Jim on my 10-day old site, right here. As soon as I approved it, and then went about clicking his name (which, because he left a web address, linked to his site), I noticed that it was trying to open that page right in “my” window. No No No!
What you really want is for that Comment Author link, when clicked, to open up in a NEW WINDOW. That way, your visitors don’t just abandon your site. You would like them to stay around and shoot the breeze with you for a while longer.
How to Open Comment Author’s Link in a New Window
There seems to be no easy way in the WP (WordPress) Admin area to accomplish this. So Googling I went.
I came across a number of potential solutions but they all involved coding and fiddling with your WordPress theme’s .php files. Not my preferred choice if I can help it. (The references at the bottom lead to some of those potential solutions I found.)
I found my (partial) solution from Studiograsshopper’s “Open comment author link in new window“.
Yes, happiness with Genesis Framework = aff link!
I say “partial” because my situation is that I am using Genesis framework with a child theme (of course): Prose Theme (<= Yes Yes Yes! I am so happy with Genesis, I became an affiliate.)
I know with Genesis framework, you DO NOT want to go fiddling around with any of Genesis’s core files and functions. You can modify its child theme’s files and functions. (That way, when Genesis provides automatic updates to better safeguard and optimize your Genesis driven WordPress site, all the customizations you have laboriously achieved with your child theme will remain intact; upgrade after upgrade.)
So keep in mind, what follows is the solution particular to MY situation. That is not to say that it might not apply to you too and/or that you won’t find within it nuggets that will help you ensure that your comment author links also appropriately open in a new tab/window.
Remember: My Criteria for an ideal solution on how to make Comment Author links open in New Tab/Window are –
Step 1
I copied the code needed for this custom function from Studiograsshopper’s “Open comment author link in new window” (reproduced below).
Genesis Framework: Use Custom Code for you customised css and functions
Step 2
In Genesis, to prevent users accidentally mucking up the php code, css, and functions etc, they provide an easy section in the WP Admin area to modify/add/delete our own specific custom coding.
Then in the “Custom Functions” area, I copied and pasted the needed code.
Add code in Custom Functions area
What can I say but “Yippee!” Now all Comment Author links on this site will appropriately open up in a new window!
Note: Added 15 Aug 2013
re. Genesis Child Theme: Eleven40 Pro
The php code given on this page does NOT work with child theme Eleven40 Pro.
Reference for those who need more:
Related Posts:
Please Share:
Like this:
Enjoyed this post?
Easily subscribe to keep get all new postings via email. No We Don't Serve Spam - Ever!
We respect your privacy