Make Author website link open in a separate window

Posted in: Newspaper
Post count: 114

Hello! How can I make the website link in the author box open in a separate window? Thanks for your help!

Post count: 22421

Hello,

In order top do this you will need custom modifications. You will have to alter this file and add a target=”blank” to the code:.Here is an example of how I added it:
https://www.screencast.com/t/sMyesbOyeROp

Thank you!

Post count: 114

Where do I get access to that code to change it? Is there a way to do it in the Custom Code section of the theme panel?

Post count: 20688

Hi,

There is no way to use custom code to do this. It can only be done by modifying the theme files. The solution provided by Bogdan will work on the post page author box. You will need to enter this code

target="_blank"

In the mentioned file, exactly like this
https://www.screencast.com/t/jRQP77XAcz
Then when you will click on the author avatar, name or website they will open in a new tab.
If you want to make this change for the author box displayed on the author page, this is the file where you can do the same thing
https://www.screencast.com/t/Pq1TLREo0

Thanks

Post count: 60

Ok thanks! but when I am adding any link in author description, it is not saving target=”_blank”

Post count: 114

Hi…could you please tell me where in the WordPress Dashboard I can access the file that you have in the screenshot? Thanks.

Post count: 60

Author profile – http://imgur.com/a/C2f0q

Post count: 20688

Hi,


@awoodhams
Not all files can be edited through the default editor. You can use FTP and locate the needed file in the theme folder. Then make the changes as shown in the screenshot.


@Vinay
This will work for the author avatar, author name and the author website. It will not affect links you enter in the description box. I believe WordPress will strip this link property, even if you try adding it directly in the description field.

Thanks

Post count: 60

what is way to all target=”_blank” if stripping by wp

Post count: 20688

Hi,

I meant that entering manual links with the target property, in the author description field like this will not work
https://www.screencast.com/t/SdE4JpTW
Upon saving the profile it will be removed
https://www.screencast.com/t/IHai8sVOYfa
I thought this is what you were trying to do. If I misunderstood please correct me.

Thanks

Post count: 60

yes. I want to add target=”_blank” here

Post count: 20688

Hi,

Well that seems not to be possible, unless maybe with a plugin if there is one for this purpose. The link property that will cause it to open in different tab, is removed as soon as you update the profile. I found these topics about it
https://core.trac.wordpress.org/ticket/12056
https://geek.ng/2012/02/using-target_blank-and-other-html-in-worpress-authors-bio.html

Thanks

Viewing 12 posts - 1 through 12 (of 12 total)
The forum ‘Newspaper’ is closed to new topics and replies.