• Hello people,

    I just installed the NextGen Gallery plugin. I would like to link the images in my gallery to another page. I already installed “NGG Custom Fields” and added a link in the custom field to try it out. I read that I have to change this:

    <div class="ngg-gallery-thumbnail" >
    <a href="<?php echo $image->imageURL ?>"
    title="<?php echo $image->description ?>"
    <?php echo $image-<thumbcode ?> >
    
    <img title="<?php echo $image->alttext ?>"
    alt="<?php echo $image->alttext ?>" src="<?php echo $image->
    thumbnailURL ?>"
    <?php echo $image-<size ?> />
    
    			</a>
    		</div>

    In my nggallery.php-file to this:

    <div class="ngg-gallery-thumbnail" >
    <a href="<?php echo $image->ngg_custom_fields["Link"]; ?>"
    title="<?php echo $image->description ?>"
    <?php echo $image->thumbcode ?>  >
    <img title="<?php echo $image->alttext ?>"
    alt="<?php echo $image->alttext ?>" src="<?php echo $image->
    thumbnailURL ?>"
    <?php echo $image->size ?> /></a>
    
    <a href="<?php echo $image->ngg_custom_fields["Link"]; ?>">
    <?php echo $image->alttext ?>
    		</div>

    If you need more information to solve this please tell me!

    https://wordpress.org/plugins/nextgen-gallery/

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Linking image to page’ is closed to new replies.