Pinterest Lightbox
Pin It Button Navigates Away From Site (13 posts)

  1. girathryn
    Posted 4 years ago #


    Thanks so much for an easy and awesome plugin. I do have a request, though: when users click on the Pin It button, it loads in the same window, so the user inevitably navigates away from the site.

    It would be awesome if clicking on the Pin It button opened a popup or at least a new tab or window...

    Is there an easy way for me to make this change myself?

    Thanks again!



  2. coffeeshopped
    Posted 4 years ago #

    I second that! I was poking around the plugin code... I'd try to add it myself, but that JS is all minified so it's pretty hard to change. If I could get the source I'd give it a shot!

  3. Russ Robinson
    Posted 4 years ago #

    Amazingly easy-to-install plugin, and it "just works". However, the fact that users are directed away from my site is kind of a deal-breaker. Would LOVE the ability to open the Pin It link in a new tab/window.

  4. canwild
    Posted 4 years ago #

    I used jsbeautifier.org to de-minimize the JavaScript and added target="_blank" to function(Q) around the new line #66. This opens the Create Pin page in a new tab.


  5. canwild
    Posted 4 years ago #

    Search for
    <div style="clear:both;"></div>
    in jquery.pinterest-lightbox.js and replace it with
    <div style="clear:both;"></div><script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>

    This will launch a pop-up window when you click the Pin It button. The javascript is part of the Pin It button code provided by Pinterest and appears to be missing from the plug-in.

  6. girathryn
    Posted 4 years ago #

    canwild, you are a rockstar! Thank you so so so so so much!

  7. kellyrnh
    Posted 4 years ago #

    I tried canwild's fix, and it indeed gives me the popup, but now the image area is blank. Any ideas? Thanks so much!

  8. jekamean
    Posted 4 years ago #

    I have the same problem as kellyrnh. When you click pinit, the thumbnail that shows up is blank.

  9. pwalzer
    Posted 3 years ago #

    Has anyone resolved this last problem?

    I am also having the same issue. Once I put in the code for opening in a new window it loses the thumbnail image :(

  10. cuentacanciones
    Posted 3 years ago #

    Actually, the solution is simpler that adding that script that canwild mentioned, you just need to find in jquery.pinterest-lightbox.js :


    and replaced with

    count-layout="horizontal" target="_blank"

    and that's it, i'ts working now on http://www.crhoy.com/la-impactante-belleza-de-kelly-brook/ for example.

  11. afineaffairdj
    Posted 3 years ago #

    Thanks so much, cuentacanciones. That worked perfectly.

    For those of you who are lacking in knowledge of code/backdoor editing like myself, you'll be able to edit the referenced count-layout="horizontal" in the actual jquery.pinterest-lightbox.js file. You can find that in your hosting account files.

    On the Bluehost cPanel, I did this to access and edit the file:

    File Manager (the document root for the wordpress install you would like to change) > wp-content (folder) > plugins (folder) > pinterest-lightbox (folder) > javascript (folder) > right click to edit the code for jquery.pinterest-lightbox.js file.

    Then do a quick search for what you need to change in the code, change it, and save it. Now the Pinterest button will open perfectly in a new tab!

  12. afineaffairdj
    Posted 3 years ago #

    You can see examples of the code change working here:

  13. outbuildings
    Posted 3 years ago #

    Hi thanks for the tip.

    I have tried the Mod and it opens the new window but the thumbnail loads and it is BLANK.

    I have also tried _NEW but that doesn't make a difference, it still loads blank.

    Any ideas.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Pinterest Lightbox
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic