Force links to open in new tab

Posted in: Newspaper
Post count: 22

Hi,

I’ve been forced to build a strange website wherein a post’s excerpt is acting as the entire post. Within the excerpt I have a text link, but want to force all of these links to open in a new tab. I tried updating the individual excerpt to include target=”_blank”, like the following (putting () around the tags so you can see the text)

(<a) href=”https://howwegettonext.com/the-worlds-first-marschitect-is-laying-the-groundwork-for-architecture-in-space-6ec3fe2121cf&#8221; target=”_blank”> Read more on How We Get To Next.()

but that doesn’t seem to work. Any ideas? Thanks very much.

  • This topic was modified 9 years by BkkGreg.
Post count: 22421

Hi,

The only way of getting the links inside the excerpt to open in a new tab is to manually add the html for it in the custom excerpt field. That will override the theme excerpt and display the one you type in. You can add a custom excerpt in post edit here: http://screencast.com/t/8NOhOEhewpW

Thank you!

Post count: 22

Thanks so much. That’s what I’m doing, but for some reason it’s led to another problem. The links open fine in another tab when using Chrome. When using Firefox the site looks fine but the links don’t open in another tab. And when I open the site on Internet Explorer (ugh) the links open in another tab, but the site looks horrible!

The site is https://outside.agoda.com/

Any ideas why this is?

Post count: 22421

Hi,

I have tested this on IE Firefox and Chrome and all of them seem to be working properly. i could not see any issues at all on either browser. I tested this link: http://screencast.com/t/n5Ctyddatqu Please provide an example of a link that does not work properly and you may want to check the html structure to see if there is no open tag that gets interpreted differently on each browser.

Thank you!

Post count: 22

Hi, thanks. It’s so weird – the same soure=”_blank” code on different post excerpt pages acts differently, with no discernible pattern. Sometimes it works, sometimes it doesn’t. Driving me crazy.

Anyway another problem we have is that the site looks awful in IE. Chrome and FF look great, but in IE it’s broken. (The only reason I care is that a company executive told us it looked bad on IE…no idea why he’s using that piece of junk).

Here’s how it’s supposed to look:
 photo Chrome_zpswq43wl6x.jpg

And here’s how it looks on IE:
 photo IE_zpsje7w0e3j.jpg

Any ideas? Thanks.

Post count: 22421

Hi,
I have tested your site on every version of IE from 9 up but could not see the issue. This is truly strange.
DAMN IE: http://paulhastings.me/wp-content/uploads/2011/12/If-Browsers-Were-Guns.jpg
Please try to disable all plugins except visual composer, clear cache and reset dn files. There could be a plugin conflict affecting IE. I can;t say for sure as I cannot even see the error.
You might also try to update your theme and visual composer to the latest version
theme 7.4 and VC 4.12.1
You can use these guides: https://forum.tagdiv.com/how-to-update-the-theme-2/https://forum.tagdiv.com/how-to-update-visual-composer-plugin/
Let us know if you still have trouble afterwards.
Thanks

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