WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. girathryn
    Member
    Posted 2 years ago #

    Hello!

    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!

    http://www.thealternativebride.com/bridal-bouquet-pictures-roses/

    http://wordpress.org/extend/plugins/pinterest-lightbox/

  2. coffeeshopped
    Member
    Posted 2 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
    Member
    Posted 2 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
    Member
    Posted 2 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.

    http://canadawilderness.com/photo-contest/2011-photo-contest

  5. canwild
    Member
    Posted 2 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
    Member
    Posted 2 years ago #

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

  7. kellyrnh
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

  9. pwalzer
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

    count-layout="horizontal"

    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
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

    You can see examples of the code change working here:
    http://www.afineaffairdj.com/category/iowa/

  13. outbuildings
    Member
    Posted 1 year 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

About this Topic