Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1843
    Dam Dasteralo
    Participant

    Hello,
    I would like to open attachments images of a post in a lightbox.
    I can only open one image but the “associated” images are not shown in the lightbox.
    How can i do that ? Here is me test page:
    http://www.aurelieschweizer.com/dev_presse/
    Thanks for your help.

    #1856
    Bartosz
    Keymaster

    Nice website.

    Please take a look ath the links. Only one of them point to an image. Other 2 point to html, thus it’s not opened in a lightbox.

    #1857
    Dam Dasteralo
    Participant

    Thanks for your compliment and quick support!
    The first two links point to an url. That’s normal and that’s what i wanted. I use a custom field to determine if it’s a “link” or a “lightbox”
    The problem is on the third link “Buyer’s guide – Salon Première Classe”
    i have attachmed images on this post and i need my lightbox to display the attached images and not only one.
    in fact i have to open a group of images and not only one.
    Hope my english is good enough :)

    #1866
    Bartosz
    Keymaster

    I see. Than it is not possible to do it like that. You can open a gallery if all the image links are available on the current site (for example a gallery of images under the post that is opened if you click on any of the images).

    #1867
    Dam Dasteralo
    Participant

    I think that is what i have.
    I have a post with 3 images (associated to a featured thumbnail) but when i click on the image that only open one image and not the others. maybe it’s because of my link wich is not good?
    Here is my code:
    <a class="image-wrap" href="<?php echo $lightbox; ?>" rel="lightbox[gallery]" title="<?php the_title();?>"><?php the_post_thumbnail('alt-post-thumbnail'); ?><span class="zoom-icon"></span></a>

    $lightbox is the link variable defined in the custom field named lightbox-url

        <?php
          $custom = get_post_custom($post->ID);
          $lightbox = $custom["lightbox-url"][0];
        ?>
    #1868
    Dam Dasteralo
    Participant

    You are right!!
    It works when i open the post where the gallery is set

    http://www.aurelieschweizer.com/portfolio/buyers-guide-salon-premiere-classe/

    But how can i have the same results in my previous page ? It might be a problem on the link right ?

    #1872
    Bartosz
    Keymaster

    It’s more than a link problem. You’d have to have all the image links on your currents site – loaded via AJAX (on opening a simgle image event) or by hinding image links (which is not very elegant but simplier if you’re not an experienced developer).

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.