• tomdelonge

    (@tomdelonge)


    I’m trying to understand the best way to do this. I’ve got a portfolio styled theme, and on the front page there’s just images. Right now, if clicked, they each take you to their respective single page views. Rather than this, I’d prefer to have images associated with that post be shown in a lightbox style modal window.

    I’m not asking for specific coding details, I know how to do that (like using a jquery plugin to take a group of images and allow the user to click “next” or “prev” to cycle through them). What I need though is to understand how the admin can add images to a post in such a way that they are in a group and how I can retrieve a list of those images.

    Please ask for further clarification if you’re not sure what I mean.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • futurepocket

    (@futurepocket)

    You need to expand the WordPress gallery function to use lightbox. There are plugins to do this, including the jquery lightbox plugin (which actually works), which can do that with any and all inserted galleries into WordPress posts. You can also use NextGEN gallery.

    Thread Starter tomdelonge

    (@tomdelonge)

    Ok perfect idea – I’ll use the gallery functionality.

    I’m trying to custom build the lightbox stuff (well use a jquery plugin but not a wordpress plugin).

    In the template, how can I access each image associated with the post?

    For example, the home page right now in the template loops through recent posts and displays their featured image. I need to loop through each post and then loop through each of their gallery images so I can output some links to each image. How (from a template) do I access a post’s gallery and that gallery’s images?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘using images in a lightbox for a post’ is closed to new replies.