Wordpress Link Post to open in a new tab?


Hi All,

I’m using @nahumck action to post Link-Posts to Wordpress and it works great.

I’d ike to have the links opening in a new tab rather then leaving my blog. Is this at all possible? How to? (My lack of js is preventing me to find a solution!)

Any help would be greatly appreciated!!!



Markdown doesn’t support that natively, so you would need to introduce some step that modifies the Markdown links to HTML links (still valid in Markdown) with a target property of “_blank”.

See https://stackoverflow.com/questions/4425198/can-i-create-links-with-target-blank-in-markdown for some discussion of this.

But, many sites only apply this if the link is external to the site, so you may need some consideration of that.

You probably also need to consider the existing pages you’ve published on your blog. Presumably you want consistency of behaviour.

FWIW, I guess it would also be possible to have some embedded JavaScript on the pages rewrite links if you tagged them somehow; but that’s just shifting where the processing is done.