If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
June 19, 2011 at 8:26 pm #4697
I have got almost everything figured out in the Display theme but I cannot figure out how to get images into a lightbox for display on a portfolio page. I understand that you create a post and you put a url in for a preview image but images that I attach to a category do not display in the lightbox, only the preview image. How do you populate a lightbox with images. I have read the documentation but cannot figure this out. I have assigned the categories to display on the portfolio page.June 20, 2011 at 5:36 am #47221
the portfolio page itself can only show the preview images of the portfolio posts. Within a post you can add the lightbox feature by adding following code to image links:
i.e. a sample cpode would look like:
<a href="images/fullscreen/2.jpg" rel="prettyPhoto" title="This is the description"><img src="images/thumbnails/t_2.jpg" width="60" height="60" alt="This is the title" /></a>
More samples can be found here: http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/June 20, 2011 at 4:16 pm #47222
This helps but I guess I am still lost. I am still having trouble creating a lightbox with images in it that is specific to the post for the portfolio.
1st – I have two posts so far and I am getting both full size preview images in the lightbox for each one of them.
2nd – Do you insert a link or images within the html of the post in WordPress to get the images in the lightbox? I’m not quite sure where you put the images for a specific lightbox and how that lightbox relates to the image preview in the post.
3rd – When I put the code in the image links in the post I get multiple light boxes in the post itself.
ThanksJune 22, 2011 at 9:47 am #47223
1) Featured images of post and pages are linked to the lightbox by default. Also the portfolio overview pages link the images to the lightbox by default.
2) Yes – you insert the rel attribute in the html code. Switch to “html view” if you’re using the “visual” text editor and add rel=”prettyPhoto” to your image links. If you want to connect all images within a post to one “lightbox gallery” use rel=”prettyPhoto[singlepost]” instead.
3) I think 2) solves the problem :)July 2, 2011 at 10:14 pm #47224
I’m still having problems.
I just cannot get an Lightbox to work.
Do I have to activate the plugin PrettyPhoto or is it already activated when the theme is installed?
Thank you.July 3, 2011 at 9:55 am #47225July 3, 2011 at 1:07 pm #47226
I have taken this out of Maintenance Mode so you can take a look at it.
The site is hardly finished. I’m just trying to get my “Portfolio” set or the technique for getting images into a Lightbox before I complete the site.
I believe I have done what you recommended but I still get the two preview images from each of my two posts in the same Lightbox, while the images I have in the actual post do not populate the light box.
The way I would like it to be with the Portfolio right now is one gallery for “Sunday Morning Rogers Park” and a second gallery for “Greece” with the images that have been inserted into the post populating their respective galleries.
I do not know what I am doing wrong.
Again, thanks for your help.July 3, 2011 at 2:54 pm #47227
Ok – now I understand what you’re trying to achieve. The bad news is that it’s not possible to display images which are part of the post content in the portfolio lightbox. The lightbox navigation works if you view the post itself (i.e. like here: http://www.davidkogan.net/2011/06/sunday-morning-rogers-park/ ) however the portfolio lightbox can just display one image per post (it’s the featured image which appears as thumbnail too).July 3, 2011 at 5:10 pm #47228
So, if you go here:
and click on “Funky Town” you get a lightbox with 8 different images in it.
How is that done? It seems that is exactly what I want to do.
That would be like an image gallery at: http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/#!prettyPhoto%5Bpp_gal%5D/0/July 3, 2011 at 9:02 pm #47229
I didn’t find funky town but I think what you refer to is the portfoliooverview page: http://www.kriesi.at/demos/display/portfolio/
The 8 images are the featured images of the portfolio entries – you see 9 posts on this page and each post has a featured image/preview image. You can create a post for each image but imho it’s a bad workaround. I’d use nextgen gallery, etc. instead.July 3, 2011 at 10:31 pm #47230
Thank you, you are correct. What I am getting on my portfolio overview page is the same thing. I now understand.
It looks like the nextgen gallery will do what I want. I’ll give it a try.
Thanks for the tutorial.July 4, 2011 at 12:55 pm #47231
The topic ‘Can't figure out how to get images into a lightbox on Portfolio Page’ is closed to new replies.