• Hi all –

    I am having issues when trying to have a picture open in lightbox and show pictures within the gallery labeled after the post (product name in my case). I know what is missing I just can’t figure how to do it with PHP.

    My site: https://www.recordyouradventures.com/new/#camera (try clicking the picture above GoPro Hero 3)

    The code I have for the picture link:

    $link = get_permalink($post_id);
        $title = esc_attr($post->post_title);
        $class = ' class="pretty prettyPhoto['.($post->post_title).']" ';

    The issue is my URL not designating the correct path. See the lightbox works well (on localhost, on live site it conflicts with my current store URLs) if the link is:
    https://localhost/recordyouradventures/store/camera/gopro-hd-hero-3/#!pretty%20prettyPhoto[GoPro%20Hero%203]/0/

    However this is what we get when clicking the picture:
    https://localhostrecordyouradventures#!pretty%20prettyPhoto[GoPro%20Hero%203]/0/

    So the bottom line is I’m missing the /store/camera/gopro-he-hero-3/ in the link when clicking.

    Any ideas on how to obtain this? Thanks in advance!

Viewing 1 replies (of 1 total)
  • Thread Starter adventureseeker

    (@adventureseeker)

    And perhaps I should mention the code for the pictures I’m trying to call in the lightbox. It’s below, notice the class of “prettyphoto” is named after the product:

    <a class="pretty prettyPhoto[GoPro Hero 3]" href="https://www.recordyouradventures.com/new/wp-content/uploads/2013/04/front.jpg"><img src="https://www.recordyouradventures.com/new/wp-content/uploads/2013/04/front.jpg" alt="GoPro Front Mount" width="300" height="300" class="alignnone size-full wp-image-157" /></a>

Viewing 1 replies (of 1 total)
  • The topic ‘Picture link and lightbox – small portion of code missing’ is closed to new replies.