WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to get the gallery url of images. What I want to do is this:

image1 image2 image3 are in gallery "Pinto". When a user clicked for example on image 1 and it pop-ups in lightbox I want there to show from wich gallery is the image and when the user clicked on that link to go to that gallery.

I found out how to get the gallery title - <?php echo $gallery->title ?> , but couldn't find the right code for the gallery url.

Any help would be greatly appreciated.


p.s. Sorry for my English.

share|improve this question

closed as not constructive by EAMann Feb 19 '12 at 0:56

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 0 down vote accepted

Never mind...i found the CODE (with the help of Alex Rabe), it is as follows:

<?php echo get_permalink( $image->pageid ) ?>
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.