Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1114129

    Hi there,
    Maybe it’s my imagination, but I thought social media share buttons at the bottom of the blog posts were supposed to open pop-up windows. We just noticed that they are instead opening a new tab.
    We have recreated this on multiple computers with both Chrome and Firefox.
    We are running the latest WP and Enfold.
    Thanks!

    #1114527

    Hey perfectword,
    Sorry for the late reply, opening a new tab is correct. I don’t recall them opening popups.

    Best regards,
    Mike

    #1114537

    Thanks!

    I find the new tab awkward. Any advice on how to turn those links into pop up browser windows?

    Thanks again!

    #1114604

    Hi,
    I found that adding the attribute:

    onclick="window.open(this.href, 'windowName', 'width=1000, height=700, left=24, top=24, scrollbars, resizable'); return false;"

    forces a popup.
    Try adding this code to the end of your functions.php file in Appearance > Editor:

    Please see below

    Best regards,
    Mike

    #1114751

    Thanks for the solution! Pop-up works great–much better.
    For whatever reason (I couldn’t figure out exactly why), though, your code made all of the links on the page pop up, not just the share links. I ended up using this code and now it’s only getting the share links:

    function social_popup(){
      ?>
      <script>
    (function($){
    jQuery(window).load(function(){
    $(document).ready(function(){
      $(".av-share-link").find("a").attr("onclick","window.open(this.href, 'windowName', 'width=670, height=2000, left=24, top=24, scrollbars, resizable'); return false;");
    });
    }); 
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'social_popup');
    #1114754

    Hi,
    Thank you for sharing your solution. I think I had too many brackets, but I’m glad you got it sorted out.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.