A href target _blank doesn't work

Hi

I have two questions.

  1. I use the built-in post editor to create links and want all links to be opened in a new page/tab (as hown in the image below). But in the same post, only the links that go to internal pages open in a new tab. The ones link to other sites, like Amazon, don’t. For example,


(the first two links open in a new tab, but the third one becomes target _self)

  1. I like to add a small caption underneath the picture on the home page to state the source. How do I do that?
    https://sleepynights.net/

Hello Ko-Ching,

Thanks for writing in!

I checked the website and the source code. I don’t see any issues with the HTML link code for 3rd link that’s pointing towards external URL but open in a same tab.

To check the setup further, can you please share website login details in secure note for us to take a closer look at the setup?

When you add the image using WordPress edit image tool, you get the option to add caption for the image. Here’s a screencast that you can take a look.

Thanks.

Hi Prasant,

I left a user name and password for you with “Editor” capability in the secure note.
(is “Editor” sufficient?)

I found out the external link “nap wheel” in this article does open in a new tab.


It seems like the ones don’t open in a new tab are affiliated Amazon links. Can it be a problem with a plugin called BestAzon? I installed BestAzon to manage all the Amazon links.

I added caption in the media library, but it didn’t show up after I updated and refreshed the homepage. Could it be overwritten by the ICON theme?

Hi Joyce,

The login credentials aren’t working, and admin capability should be helpful as well in case we need to check other plugins. Please provide the correct login credentials.

As for the link, does it use plugins or scripts to implement the affiliate links? It could be the code as it’s only the javascript that can override the default behavior of a link, it should open a new tab due to target="_blank" added to it, but it’s not. I’ll check that once the login credentials are available.

About the caption, the suggestion was for built-in post editor while you insert an image. It doesn’t apply to the image element added to the builder. Perhaps you could add text element and insert image there with the caption :slight_smile:

Thanks!

Hi Rad,

Thank you for your reply. The link issue was solved. Just found out in the BestAzon plugin’s setting, the default was set to “use the original setting in the link”, which strangely didn’t work. But there’s an option to force every affiliate link to open in a new window, and that fixed it. I should have found out sooner and not wasted your time. Thank you.

You’re welcome, @Joyce82. Glad you’ve found the solution. Just remember to always test for plugin conflict by deactivating all third-party plugins before reporting an issue.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.