Site icon Hip-Hop Website Design and Development

How to add a target to a link

Is there a filter I could use to get and change the html output of a link? I would need to add a target=”_blank” in some cases.

I’m using the filter post_link to change the url itself where neccessary, but I would need to be able to modify the html part as well. I cannot find correct filter, I ran into a “edit_post_link” filter, but that didn’t do the trick as it seems like it’s working only at the back-end.

Thanks to everyone who can give me some hint!