• AlbinoMonkey

    (@albinomonkey)


    I am trying to change the lightbox features on my portfolio page so that when the image is clicked on it opens the post page and not the full size image is this possible?

    The current php code is

    <a href="<?php if (get_option_tree('open_as_lightbox') == 'Yes') { echo $lightbox_link; } else { the_permalink(); } ?>" <?php if (get_option_tree('open_as_lightbox') == 'Yes') { ?>data-rel="prettyPhoto[<?php echo $post_slug; ?>]"<?php } ?>>
    										<img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" />

    The site page is https://cjsukimport.com/?page_id=24

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • where is the lightbox? Is it from your theme, or a plugin?

    You need to find where

    $lightbox_link;

    is defined, and edit that.

    Or

    <a href="<?php the_permalink(); ?>" <?php if (get_option_tree('open_as_lightbox') == 'Yes') { ?>data-rel="prettyPhoto[<?php echo $post_slug; ?>]"<?php } ?>>

    changing to that would work easier I suppose

    Thread Starter AlbinoMonkey

    (@albinomonkey)

    Hi Rev. Voodoo,

    Thanks for the reply, I changed the PHP in the correct file but now it says image cannot be loaded when I click on the images.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing the php file of a lightbox’ is closed to new replies.