Basic gallery with lightbox needed

resolved (7 posts) (2 voices)

  1. I would like to create a simple gallery with a lightbox feature, that is easy to manage for a client. That is, I can create a new page for the site, upload a few dozen images to that page, insert some shortcode and have that group of images display as a series of thumbnails that when clicked, open to enlarged views via lightbox that can be scrolled from image to image.

    Please tell me if I am missing something. As I understand it:

    1. The Portfolio shortcode is for use in pulling images from blog posts.

    2. I could go the route of creating a group of fancy images,

    but that is a bit more time consuming to copy and paste each image url in the page after uploading and is not so user-friendly for a typical client user to maintain, plus I would have to hack the code to make it work so that the lightbox display could be clicked on to go to the next or previous image

    3. I could use the default WordPress gallery function - which might work, but there is no lightbox working with that option - (Is there?)...(would there then be a conflict with just installing a plugin for the lightbox to work on this?)

    I think that is it for the thumbnail type gallery presentation options. Am I missing anything? Any other suggestions?


    Posted 5 years ago #
  2. I tried that but it did not work.

    Specifically, I am using the elegance theme and I found what looked like the same line referenced in the above link on line 118 of that custom.js file. So then I put the additional code snippet before it changing

    * prettyPhoto
    	jQuery("a[rel^='prettyPhoto'], a[rel^='lightbox']").prettyPhoto({
    		overlay_gallery: false, social_tools: '', 'theme': prettyphotoTheme /* light_square / dark_rounded / light_square / dark_square / facebook */


    * prettyPhoto
    	jQuery('.gallery-icon a').attr('rel', 'prettyPhoto[wordpress_gallery]');
    	jQuery("a[rel^='prettyPhoto'], a[rel^='lightbox']").prettyPhoto({
    		overlay_gallery: false, social_tools: '', 'theme': prettyphotoTheme /* light_square / dark_rounded / light_square / dark_square / facebook */

    then I went back and tested the site and although it looked like the prettyphoto script was starting, I got an error message "Image cannot be loaded. Make sure the path is correct and image exists."

    It also added #!prettyPhoto[wordpress_gallery]/3/ to the url, to show this:!prettyPhoto[wordpress_gallery]/3/

    I have the page private now so that I can get this resolved before it goes live.

    Thanks for your help


    1. prettyphoto-error.jpg (70.7 KB, 0 downloads) 5 years old
    Posted 5 years ago #
  3. Elliott

    Send us a link to your page and we'll take a look.

    Posted 5 years ago #
  4. Woops. I missed part of the post above that you linked me to, the part about changing the gallery code to include link="file". Doing that fixed it. Thanks.

    Posted 5 years ago #
  5. I would like to ask a follow up question to having used the above code to get PrettyPhoto working with the default Gallery plugin. I have two requests for help please.

    Is there some reason it is taking so long for PrettyPhoto to first open?

    If you go to the site I created here:

    When you first click on an image, it takes very long for it to first open. I thought perhaps it was the file size of the images, but they are not that large really, most of them, and once it opens it does not take long to move from one slide to the next when scrolling through them.

    Can you advice on this?

    Also, the url takes on some extra code that I really do not want there after it loads so that it is this when prettyphoto is open,!prettyPhoto[wordpress_gallery]/1/

    and then this after it has closed - but still on that page:!prettyPhoto

    Thanks so much.

    Posted 5 years ago #
  6. Elliott

    1. It loaded instantly for me.

    2. That's a feature that lets people link to your page and open one of your images up in prettyPhoto automatically. It's pretty useful but if you still want to take it off then see here,

    Posted 5 years ago #


You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme