My theme includes a specific template for image galleries – The Pinterest icon shows up on both posts and pages correctly, but it doesn’t show up at all with WordPress generated galleries with the gallery template.
Page (works): http://chicagophoenix.com/galleries/
WordPress Gallery in Gallery Template (doesn’t work): http://chicagophoenix.com/galleries/gallery-freedom-to-marry-reception/
It also doesn’t seem to work on the Fancybox popup (click on one of the images from the link above). As these are the large images, it’d be ideal for it to appear on those photos and not the smaller ones in the articles.
Indeed, there is a slight problem with the Fancybox plugin – I’m still working on a solution. The gallery is a bit harder to get done – the plugin gallery usually uses a shortcode to generate it, which might make it a bit harder to solve.
Regarding linking the larger image (instead of the smaller one), thanks for the heads-up! I’ll probably include this in the next release.
I can give you admin access if you’d like to see how it is configured with gallery templates, but if you can get it to work in a Fancybox popup, then I don’t see a need for it to work in the gallery template – also, I made the Pinterest window open in a new window rather than the current window, as the Pinterest “create pin” window doesn’t give an easy way to get back to the originating site.
Changed this: $pinfinish = ‘” class=”xc_pin”>’;
To this: $pinfinish = ‘” class=”xc_pin” target=”_blank”>’;
I think a modal box (Fancybox, for instance) would look better, but thats above my know-how.
With all those, I really think this is already an amazing plugin with a lot of potential.
This is how I used Pinterest with Fancybox: http://scottgale.com/blog/using-pinterest-with-fancybox/2012/08/15/
I used a callback function. Check it out and see if that makes sense for you.
Where does one put that code? Can something like it be accomplished for Lightbox Plus galleries?
Are you thinking this one? http://wordpress.org/extend/plugins/lightbox-plus/
I could take a look. Link me to the one you like to use and I’ll see how to modify.
Yes, that’s the plugin I’m using. Thank you.
I tried adding class to html like:
[gallery class="pinthis" link="file" order="DESC" columns="6" orderby="post_date"]
That didn’t work. So I tried renaming every instance of pinthis to cboxPhoto in ppibfi_pinterest.php and ppibfi_admin.php but no luck there either.
The plugin also works without the
class="pinthis". Or at least it should.
@amazemedia – Renaming the instance won’t help. I assume “cboxPhoto” is the name of the class images have when inserted thru this gallery. In this case, open the file ppibfi_pinterest.php and search for the following line:
preg_match( '/class=[\'"](.*)?' . trim( $pinthis ) . '(.*)?[\'"]/i', $tag, $matches );
Change it to:
preg_match( '/class=[\'"](.*)?cboxPhoto(.*)?[\'"]/i', $tag, $matches );
This should work (I haven’t tested it). Maybe next version I should enable a way for the user to easily change the class that will have the button.
Let me know if this works.
No luck. Does still work on thumbnails. I do appreciate your help.
- The topic ‘[Plugin: Pinterest Pin It Button For Images] Doesn't show on other templates or Fancybox’ is closed to new replies.