Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #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 ?

    #1030451

    Hey Anton,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #1030470
    #1031406

    Hi,

    Please take a look here
    https://stackoverflow.com/questions/4907843/open-a-url-in-a-new-tab-and-not-a-new-window-using-javascript

    You 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,
    Basilis

    #1031414

    Hi,

    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 it

    #1032296

    Hi Anton,

    Can you disable caching and minification for now?

    Best regards,
    Victoria

    #1032320

    Hi,

    I don’t know what do you mean by “for now”, but I’ve disabled it

    #1033158

    Hi 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,
    Victoria

    #1033165

    Hi,

    the code doesn’t work. The button still opens the email service in the same tab

    #1033580

    Hi 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,
    Victoria

    #1033682

    Here you go

    #1034137

    Hi Anton,

    Can you please have Appearance > Editor enabled?

    Best regards,
    Victoria

    #1034175

    Hello,

    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.

    #1035616

    Hi Anton,

    Thank you. I adjusted the script for you. It is opening the new tab now. Please check.

    Best regards,
    Victoria

    #1035810

    Hello,

    well, looks like it works now :)
    thank you so much !
    you can close the thread

    Best,

    #1035824

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Share my email in a new tab’ is closed to new replies.