- This topic has 12 replies, 2 voices, and was last updated 9 years, 8 months ago by ovidiu.
-
AuthorPosts
-
19 March 2015 at 11:14 #6191ovidiuParticipant
Hi there,
the plugin doesn’T seem to work for me for existing galleries so I tried manually adding the rel=”lightbox” and it didn’t change anything. Not sure what that setting does inside responsive lightbox where it says: Select to which rel selector lightbox effect will be applied to.
I then edited an existing post, removed the gallery, inserted it again (while responsive lightbox plugins is active) saved and refreshed but still not working.
Can you spot any problems here: http://pacura.ru/portrait/shoot-for-zando-co-za/ (PrettyPhoto selected with default settings)
There are no .js errors, I checked with firebug.
Is it possible there is a problem with me running ngx_pagespeed on my server?
19 March 2015 at 11:25 #6193BartoszKeymasterHi @ovidiu,
Your code seems fine. What is your setting for rel selector, the one you mention in your question. Is it set to “lightbox” or something different?
12 April 2015 at 12:41 #6357ovidiuParticipanthi and sorry for my late reply, I thought I’d get email notifications about replies here, my bad.
The selector is set to the default value of “lightbox”
Any other info I can give you to help solve this issue please?
###edit###
I subscribed to notifications via email but never received them, not even in my spam folder, maybe check on your side?14 April 2015 at 12:40 #6367BartoszKeymasterAre you using Jetpack tiled galleries?
ps. we’re checking the notifications issu
14 April 2015 at 13:05 #6368ovidiuParticipanta derivative of jetpack: http://www.takebarcelona.com/tessa_powerpack/ – I could switch to any other alternative that shows tiled galleries though. if you have any other suggestions?
14 April 2015 at 15:11 #6369BartoszKeymasterIt will not change anything. Problem is the HTML structure that galleries generate.
I think we’ll provide an option to make RL compatible with that kind of gallery. For now it can be achieved only by some custom coding of the gallery shortcode.
14 April 2015 at 15:35 #6370ovidiuParticipantCould you give me a link or an exmaple of what I need to do (regarding this custom short code?) please?
14 April 2015 at 15:47 #6371BartoszKeymasterSorry, but I can’t help you with that. You need to put rel=”ligthbox” or rel=”lightbox[gallery-n]” before the border=”n” in tiled gallery links.
Google: wp custom gallery shortcode
14 April 2015 at 18:40 #6373ovidiuParticipanthm, I managed to create/change the WP gallery short code with some help but the styling is now completely different from what the tessa pack usually delivered. result: http://pacura.ru/portraits/shoot-for-zando-co-za/
Oh, well, gotta see if I can fix this somehow or just go without lightbox :-(15 April 2015 at 13:48 #6377ovidiuParticipantFor anyone else searching for the same, here is the solution that worked for me: https://wordpress.org/ideas/topic/add-rel-or-class-to-image-links#post-23806
Alternatively try this one: http://www.remicorson.com/tip-add-a-rel-attribute-to-wordpress-gallery-for-lightbox-use/ or this plugin: https://wordpress.org/plugins/add-rel-lightbox/
27 May 2015 at 20:07 #6702ovidiuParticipantI “had” fixed this issue by adding this code to my functions.php
//trying to fix galleries for responsive lightbox add_filter( 'wp_get_attachment_link' , 'add_lighbox_rel' ); function add_lighbox_rel( $attachment_link ) { if( strpos( $attachment_link , 'a href') != false && strpos( $attachment_link , 'img src') != false ) $attachment_link = str_replace( 'a href' , 'a rel="lightbox" href' , $attachment_link ); return $attachment_link; } add_filter('the_content', 'addlightboxrel_replace'); function addlightboxrel_replace ($content) { global $post; $pattern = "/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i"; $replacement = '<a$1rel="lightbox[%LIGHTID%]" href=$2$3.$4$5$6</a>'; $content = preg_replace($pattern, $replacement, $content); $content = str_replace("%LIGHTID%", $post->ID, $content); return $content; }
And it seemd to work except I have now realized its not always working.
Working example: http://pacura.ru/portraits/shoot-for-zando-co-za/
Non-working example: http://pacura.ru/people/shoot-for-a-fitness-manual/In te second example the rel=lightbox part is simply missing and I have deleted and re-inserted the gallery twice already. I also tried with only one gallery per page but still no-go. The images open directly in the browser, no swipebox happening.
Any ideas?
27 May 2015 at 20:12 #6704ovidiuParticipantthis might be related to your latest updates, I’m pretty sure it used to work!
28 May 2015 at 15:11 #6713ovidiuParticipantthe latest update to 1.4.14 seems to have fixed the broken galleries: http://pacura.ru/people/shoot-for-a-fitness-manual/
but the issue with the missing “title” as described in this other post is still valid => https://www.dfactory.co/support/topic/problem-with-latest-version-1-4-13/
-
AuthorPosts
- You must be logged in to reply to this topic.