Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   target="blank" for all external links in posts (http://forum.bytesforall.com/showthread.php?t=5369)

ksmith101 Jan 17, 2010 10:05 PM

target="blank" for all external links in posts
 
I need all references to external links in my post to open in a new page. I have multiple people set up as Authors and I don't want them to have to remember to add target="_blank" in the url. Is there a way to globally set this for posts?

rickheck Jun 29, 2011 01:47 PM

(bump..................)

juggledad Jun 29, 2011 02:44 PM

a link that is part of the post text is not processed by the theme, it just calls the wordpress function 'the_content()' or 'the_excerpt()', so I think you wll have to find or code a plugin to examine the post content for any links then add that to the end.

A google search found Make all links target _blank plugin which may or may not help.

lmilesw Jun 29, 2011 03:22 PM

I just tested and it looks like if you just put the following in HTML Inserts: Header it does the trick.
HTML Code:

<base target=”_blank” />

lmilesw Jun 29, 2011 06:19 PM

Quote:

Originally Posted by STB (Post 68981)
correct me if im wrong, but think that would also open *all* links in a new window

Yup... sure does. Thanks for the link.

juggledad Jun 29, 2011 07:12 PM

STB, if you read my post, you will notice that I said
Quote:

so I think you wll have to find or code a plugin to examine the post content for any links then add that to the end.

A google search found Make all links target _blank plugin which may or may not help.

lmilesw Jun 29, 2011 10:22 PM

Quote:

Originally Posted by STB (Post 68981)
that page talks about making *all* links target _blank

Yes, but the plugin they developed was created to "fix" the issue of internal links and only handle external links like the plugin you pointed to.


All times are GMT -6. The time now is 11:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.