What I’m trying to achieve is this:
– On page “Nice Gallery” I want to have a view with all the images in a 4 column grid
– When you click on one of the images you should navigate to only that image displayed in its full glory with title and description as caption
I already got step 1.
Now step 2. I figured that I can use the $image->pidlink to link to the NGgallery url to display the single image. But how to know if we are requesting a single image or just the gallery overview? Because there is $current, which holds the data for the currently displayed image, but this is unreliable: if we are at the overview, $current still exists and simply holds the info for the first image in the gallery.
Of course the URL is different; we have an image/<number> in our url that indicates that we want to see a specific image. But how to extract that information in a decent way? $_GET is unaccessible in WP, and couldn’t find any URL extraction functions in the template tags…
How am I supposed to correctly check for single image / gallery overview?
- The topic ‘How to display a gallery a single image within one template’ is closed to new replies.