April 9, 2013 at 11:40 pm #7309
Follow up question… what is the quickest/easiest way to display a slide show in lightbox? On a few pages, I want to show a single static image that opens when clicked and scrolls through pictures. I don’t want a gallery of pics on the page, or a moving slider on the page, just a single pic. Will the gallery or slider functionality allow me to do this easily, or do I need a plugin?
April 9, 2013 at 11:49 pm #7312
PrettyPhoto will take all links to images that you append a gallery tag to and group them together in the lightbox like this:
<a href="image.jpg" rel="themeblvd_lightbox[my_gallery]" title="Image 1"> <img src="thumb.jpg" /> </a> <a href="image2.jpg" rel="themeblvd_lightbox[my_gallery]" title="Image 2"> <img src="thumb2.jpg" /> </a> <a href="image3.jpg" rel="themeblvd_lightbox[my_gallery]" title="Image 3"> <img src="thumb3.jpg" /> </a> <a href="image4.jpg" rel="themeblvd_lightbox[my_gallery]" title="Image 4"> <img src="thumb4.jpg" /> </a>
So, in theory, if you wanted to hide everything but the first one, you’d just do that for the user and not even worry about thumbnails for the hidden image. You could do it something like this perhaps:
<a href="image.jpg" rel="themeblvd_lightbox[my_gallery]" title="Image 1"> <img src="thumb.jpg" /> </a> <div style="display:none"> <a href="image2.jpg" rel="themeblvd_lightbox[my_gallery]" title="Image 2">Image 2</a> <a href="image3.jpg" rel="themeblvd_lightbox[my_gallery]" title="Image 3">Image 3</a> <a href="image4.jpg" rel="themeblvd_lightbox[my_gallery]" title="Image 4">Image 4</a> </div>April 9, 2013 at 11:50 pm #7313
Using an actual WordPress [gallery], here’s one theoretical way you could do it, also —
<a href="image.jpg" rel="themeblvd_lightbox[gallery-1]" title="Image"> <img src="thumb.jpg" /> </a> <div style="display:none"> [gallery link="file"] </div>April 10, 2013 at 1:08 am #7315
OK… but I guess I’m missing a basic step… how does the gallery name get set as in “gallery-1” in your statement.
When I insert a gallery into my page is shows as [gallery link="file" ids="1165,1133,998,980,979"]. I don’t see anywhere that a name gets assigned to the gallery. What am I missing?
Thanks! mikeApril 10, 2013 at 1:22 am #7316
Jason… your code was literal! “gallery-1” is the ID! Works perfectly! Thanks!April 10, 2013 at 2:13 am #7318
Yup, WordPress just numbers the ID’s of the galleries on the current page automatically like gallery-1, gallery-2, etc, and then the theme uses this ID for the lightbox trigger.April 19, 2013 at 8:01 pm #7595
I’m having some residual issues after I setup my gallery link to a single thumbnail. All works well on the initial set-up. But if I go in and edit the page in any way, upon updating the page, WordPress changes my image insertion HTML, breaking the gallery link and messing up the page. Using [RAW] doesn’t seem to help.
As an example, my original code is:
<a href=" http://timmudd.com/hfs/wp-content/uploads/2013/04/RTRiskReport-10.jpg " rel="themeblvd_lightbox[gallery-1]"><img class="align-left wp-image-2316" alt="RTRiskReport 10" src="http://timmudd.com/hfs/wp-content/uploads/2013/04/RTRiskReport-10-320x200.jpg" width="288" height="180" /></a>
Wordpress changes it to:
<a class="wpGallery mceItem" title="gallery-1" href="http://timmudd.com/hfs/wp-content/uploads/2013/04/RTRiskReport-10.jpg" rel="themeblvd_lightbox<img src=">"><img class="align-left wp-image-2316" title="FM3 - Reconciliation Risk Report" alt="RTRiskReport 10" src="http://timmudd.com/hfs/wp-content/uploads/2013/04/RTRiskReport-10-320x200.jpg" width="288" height="180" /></a>
A broken example can be seen at: http://timmudd.com/hfs/technology/reconciliation/
Suggestions on how to make this not happen? Thanks, MikeApril 19, 2013 at 8:25 pm #7602
Are you bouncing between the Visual and Text editor? That might have something to do with it.
Note the raw shortcode wouldn’t correspond to anything here. That just effect the saved content when displaying it on the frontend of the site, not how WordPress’s editor messes with your HTML sanitizes it.April 19, 2013 at 8:31 pm #7604
Yeah… I just tested on my end. That’s what does it. I guess to put in this type of custom HTML, the editor is not going to let you switch between Visual and Text. Unfortunately this is how prettyPhoto galleries work.April 20, 2013 at 6:47 pm #7638
Dang… not so much a problem for me, but there are other site editors that are not comfortable with the text editor. Thanks Jason. mikeMay 10, 2013 at 6:00 pm #8209
Hi Jason… having a problem with one of my prettyphoto gallery links. The first picture in the gallery repeats twice before the other pics. I think it is the result of an earlier error. So I recreated the gallery. But it seems to have appended to the bad gallery-1. http://timmudd.com/hfs/technology/portfolio-management/
Is there a way to clear out or delete galleries?
Thanks in advance, MikeMay 10, 2013 at 6:42 pm #8223
I’m honestly not sure on that one. The actual WP gallery seems to be working fine. It might be a weird side effect of something to do how you’re putting that initial linked to picture into the page. You’re ending up with paragraph tags all throughout.May 13, 2013 at 4:22 pm #8266brunotoreParticipant
Hi Jason and Mike,
I am pumped about being able to link to from a single thumbnail to a gallery of images in lightbox – this is going to make my site MUCH more functional and visually appealing. I’ve successfully made one work the same way Mike has, using an actual WordPress [gallery].
What I can’t figure out is how to have 1 thumbnail link to a group of 10 images and different thumbnail link to a different group of 10 images. I’ve made one gallery, repeated the process for the 2nd gallery. Both thumbnails appear, now linking to 20 images total. The 2nd gallery actually opens in lightbox to the 11th image, but you can see the 1/20 in the bottom right. I tried changing the code to rel=”themeblvd_lightbox[gallery-2]” but the 2nd thumbnail just links to the 2nd image in the original gallery and cycles through all of the 20 images. Thoughts??
kateMay 13, 2013 at 4:40 pm #8267
@kate For this to work the way you want, WordPress needs to be giving a unique ID for each gallery when it’s displayed, which it should be. — And then you need to target that gallery ID from your thumbnail. By default WP usually does this gallery-1, gallery-2, etc.
Do you have a link to where you’re doing this?May 13, 2013 at 4:58 pm #8269brunotoreParticipant
Thanks for your quick response. Unfortunately I don’t have a link as I’m working locally before making the site live.
I think I might be doing something wrong in the process of actually added the gallery. When I click to add media, I upload new media, create gallery, select the images, click create new gallery and then add the gallery to the page. It of course results in the code [gallery ids="154,148,118,126"]. I then DELETE this code and add the
My thought was if I simply did this process several times I would simply sequentially note gallery-2, -3, etc… So, I guess my real question should be how do I see (create?) the unique ID for each gallery? I’m not seeing any sort of info about the specific galleries themselves, only the ability to create one when adding media to a page,May 13, 2013 at 5:02 pm #8270
I haven’t actually tried two galleries on 1 page. But sounds vaguely related to the issue I had last week with pictures repeating and getting appended to the gallery. Seems like WordPress is very finicky. Picking up on Jason’s observations on the extraneous paragraph tags, I actually deleted the galleries and the HTML and started fresh, inserted my gallery again. Everything is fine now.
- The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.