Custom Fields Not Working. Not Linking
-
Hi I really need help with the NextGEN custom fields.
Basically, i’ve set up the NextGEN Custom Field plugin with a Image Custom field named “Link”
I’ve switched off the Lightbox option as suggested in the installation documentation.
Currently the field is showing within the gallery, however the pictures aren’t linking. When I click them it just brings up what i’m assuming is the Lightbox (despite being switched off) or the default option instead of linking to my chosen page.– I’m using the [Gallery id = X] short code for my thumbnail gallery on the page.
– I’m not using a template for the thumbnail galleryI’ve inserted the code into the PHP file Nextgen-Gallery > Products > Photocrati_nextgen > Modules > nextgen_basic_gallery > templates > thumbnails > index.php
My code is the following. Not sure if I have put it in the correct place or if it’s even correct. I’m hoping you could shed some light on that.
<div class="ngg-gallery-thumbnail"> <a href="<?php echo nggcf_get_field($image->pid, "Link"); ?>" title="<?php echo esc_attr($image->description)?>" data-src="<?php echo esc_attr($storage->get_image_url($image)); ?>" data-thumbnail="<?php echo esc_attr($storage->get_image_url($image, 'thumb')); ?>" data-image-id="<?php echo esc_attr($image->{$image->id_field}); ?>" data-title="<?php echo esc_attr($image->alttext); ?>" data-description="<?php echo esc_attr(stripslashes($image->description)); ?>" <?php echo $effect_code ?>> <img title="<?php echo esc_attr($image->alttext)?>" alt="<?php echo esc_attr($image->alttext)?>" src="<?php echo esc_attr($storage->get_image_url($image, $thumbnail_size_name, TRUE))?>" width="<?php echo esc_attr($thumb_size['width'])?>" height="<?php echo esc_attr($thumb_size['height'])?>" style="max-width:none;" /> </a> </div>
It would be much appreciated if you help me as this is last bit to add to my website. I’ve searched high and low on the internet to try and figure it out but I just give up now.
Regards
Matthttps://www.ads-software.com/plugins/nextgen-gallery-custom-fields/
- The topic ‘Custom Fields Not Working. Not Linking’ is closed to new replies.