[Plugin: NextGEN Custom Fields] Link in custom field repeating
-
Hi there
Thank your for the plugin. It is great. I am just having a tiny problem where the information in the custom field is repeating several times in the code – looks fine on the surface but when I check the html code the external link I have put into the custom field has duplicated around four times.
I have used the plugin to make the title of the main image link to an external website (website portfolio) in NextGEN. I am using the gallery-carousel.php. This is the code I am using:
<div class="ngg-galleryoverview"> <div class="pic"> <img title="<?php echo $current->alttext ?>" alt="<?php echo $current->alttext ?>" src="<?php echo $current->url; ?>" /> </div> </div> <div class="albumtitle"> <a href="<?php echo $current->ngg_custom_fields["Link"]; ?>" > <?php echo $current->alttext ?> </div>
I tried using
$image->ngg_custom_fields
but that didn’t work at all. The strange thing is that it is repeating in the thumbnail list and the above code is outside the thumbnail code. Below is the entire code for the page thumbnail. My site is not live yet so I am unable to provide a link:<?php /** Template Page for the gallery carousel Follow variables are useable : $gallery : Contain all about the gallery $images : Contain all images, path, title $pagination : Contain the pagination content $current : Contain the selected image $prev/$next : Contain link to the next/previous gallery page You can check the content when you insert the tag <?php var_dump($variable) ?> If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?> **/ ?> <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?> <div class="ngg-galleryoverview"> <div class="pic"> <img title="<?php echo $current->alttext ?>" alt="<?php echo $current->alttext ?>" src="<?php echo $current->url; ?>" /> </div> </div> <div class="albumtitle"> <a href="<?php echo $current->ngg_custom_fields["Link"]; ?>" > <?php echo $current->alttext ?> </div> <div class="ngg-galleryoverview"> <ul class="ngg-gallery-list"> <!-- PREV LINK --> <?php if ($prev) : ?> <li class="ngg-prev"> <a class="prev" href="<?php echo $prev ?>">◄</a> </li> <?php endif; ?> <!-- Thumbnail list --> <?php foreach ( $images as $image ) : ?> <?php if ( $image->hidden ) continue; ?> <li id="ngg-image-<?php echo $image->pid ?>" class="ngg-thumbnail-list <?php if ($image->pid == $current->pid) echo 'selected' ?>" > <a href="<?php echo $image->pidlink ?>" title="<?php echo $image->description ?>" > <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> /> </a> </li> <?php endforeach; ?> <!-- NEXT LINK --> <?php if ($next) : ?> <li class="ngg-next"> <a class="next" href="<?php echo $next ?>">►</a> </li> <?php endif; ?> </ul> </div> <?php endif; ?>
I would really appreciate some help on this – several hours later and I still have no idea why it is happening.
Thank you.
- The topic ‘[Plugin: NextGEN Custom Fields] Link in custom field repeating’ is closed to new replies.