Add the following code to your javascript file to force all the external links in a site to open in a new window (or tab, depending on the user’s browser configuration).
The code also adds classes to Phone, PDF and E-mail links for easier use in CSS (for example, to add icons before or after the link).
Add the script before </body> close tag
The code needs to be loaded after the jQuery library. If you are adding it using Elementor, select "</body> End" in the location field.
Need help? See how to add custom javascript to your WordPress site.