zmcnees Posted September 19 Share Posted September 19 Site URL: https://www.zachmcnees.com/film The posters on this page are loaded as item content. They won't open as new links in a new tab regardless of whether that option is checked or not. Can't seem to find a way to make that work. Is there code that will work that will allow these film and tv posters to open as new tabs, but keep the other links on the site from doing so? Link to comment
NikolaNikic Posted September 19 Share Posted September 19 (edited) Hi, Try this code: Insert into: Pages > Website tools > Code injection <script> document.querySelectorAll('a img').forEach(img => { img.parentElement.setAttribute('target', '_blank'); }); </script> Let me know if this works for you If this worked for you please click the ' Mark as Solution ' Button. Thanks in advance Best Regards Edited September 19 by NikolaNikic Code Tweak Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment