Title: Link target &quot;_blank&quot; ??
Last modified: August 21, 2016

---

# Link target "_blank" ??

 *  Resolved [webAlma](https://wordpress.org/support/users/webalma/)
 * (@webalma)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/link-target-_blank/)
 * Hi, I’m able to make link from thumbnail to an external page. But how can I set
   link target=”_blank” so that it opens a new tab for that page? I have tried couple
   of ways to add this target but no luck. Could somebody please help. Here’s the
   code as it is now:
 *     ```
       <div class="ngg-gallery-thumbnail">
                      <a  href="<?php echo nggcf_get_field($image->pid, 'Link'); ?>"
                      target="<?php echo nggcf_get_field($image->pid, 'Target'); ?>"
                      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>
       ```
   
 * [https://wordpress.org/plugins/nextgen-gallery-custom-fields/](https://wordpress.org/plugins/nextgen-gallery-custom-fields/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [shauno](https://wordpress.org/support/users/shauno/)
 * (@shauno)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/link-target-_blank/#post-4643926)
 * If the value of your ‘Target’ custom field is “_blank”, that will work as expected.
   
   If you want all the thumbnails to open in a new window, just hard-code the `target
   ="_blank"`.

Viewing 1 replies (of 1 total)

The topic ‘Link target "_blank" ??’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/nextgen-gallery-custom-fields.svg)
 * [NextGEN Custom Fields](https://wordpress.org/plugins/nextgen-gallery-custom-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery-custom-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery-custom-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery-custom-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery-custom-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery-custom-fields/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [shauno](https://wordpress.org/support/users/shauno/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/link-target-_blank/#post-4643926)
 * Status: resolved