-
AuthorPosts
-
November 3, 2018 at 12:35 pm #1029478
Hi,
how can I make “Share by email” button (in the blog posts) open in a new tab, like do all other social buttons ?
November 6, 2018 at 5:02 pm #1030451Hey Anton,
Could you please give us a link to your website, we need more context to be able to help you.
Best regards,
VictoriaNovember 6, 2018 at 5:35 pm #1030470November 8, 2018 at 10:12 pm #1031406Hi,
Please take a look here
https://stackoverflow.com/questions/4907843/open-a-url-in-a-new-tab-and-not-a-new-window-using-javascriptYou do need to target the CSS class and open it on a new window.
Let us know if that works out for you!Best regards,
BasilisNovember 8, 2018 at 10:22 pm #1031414Hi,
honestly I don’t really understand all this gibberish in the page you gave. So i don’t know what code I have to use and where (functions.php or somewhere else)…
My concern is: all social buttons open new tabs except “Share by email”. So the question is: can you give me the same code for this button, telling me where I have to paste itNovember 11, 2018 at 8:11 pm #1032296Hi Anton,
Can you disable caching and minification for now?
Best regards,
VictoriaNovember 11, 2018 at 8:49 pm #1032320Hi,
I don’t know what do you mean by “for now”, but I’ve disabled it
November 13, 2018 at 8:49 pm #1033158Hi Anton,
Here is the code you can put in your funtions.php
function addCustomScript(){ ?> <script> function a() { jQuery('.av-share-link.av-social-link-mail').attr('target', '_blank'); } $(window).load(function() { a(); }); </script> <?php } add_action('wp_footer', 'addCustomScript');
You can enable caching when the issue is solved.
If you need further assistance please let us know.
Best regards,
VictoriaNovember 13, 2018 at 8:58 pm #1033165Hi,
the code doesn’t work. The button still opens the email service in the same tab
November 14, 2018 at 5:31 pm #1033580Hi Anton,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaNovember 14, 2018 at 9:23 pm #1033682Here you go
November 15, 2018 at 9:05 pm #1034137Hi Anton,
Can you please have Appearance > Editor enabled?
Best regards,
VictoriaNovember 15, 2018 at 11:35 pm #1034175Hello,
can you try the Editor now ? It’s supposed to work now
PS: I don’t understand what are the errors you showed in private. The only thing I can tell you is that WPdiscuz is the comments plugin that I use and which is used to work properly. So I have no idea what are these errors.
November 20, 2018 at 3:42 pm #1035616Hi Anton,
Thank you. I adjusted the script for you. It is opening the new tab now. Please check.
Best regards,
VictoriaNovember 20, 2018 at 10:16 pm #1035810Hello,
well, looks like it works now :)
thank you so much !
you can close the threadBest,
November 20, 2018 at 11:30 pm #1035824Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Share my email in a new tab’ is closed to new replies.