The WordPress editor allow authors to easily choose when a hyperlink opens the link in a new window or tab. It does this via a simple check box. You’ll see that this check box adds the
target="_blank" attribute to the anchor element.
We are not a fan of opening a new window on a hyperlink, even external ones. Readers expect that websites won’t spawn new windows, nor do they appreciate that this breaks the back/forward button navigation in browsers. We also think it is a poor method of trying to “keep someone on your page.” There are plenty of strong opinions out there, but suffice it to say, we think it is simply too easy for authors to enable this on their posts in WordPress.
functions.php file so that you can do the same thing. It does two things. First, it makes sure that the checkbox for “open link in a new window/tab” is unchecked. Then it hides it via CSS. This gets loaded on the