Title: Fancybox with magic fields. (Custom fields)
Last modified: August 21, 2016

---

# Fancybox with magic fields. (Custom fields)

 *  [garydos34](https://wordpress.org/support/users/garydos34/)
 * (@garydos34)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/fancybox-with-magic-fields-custom-fields/)
 * I am having an issue trying to get fancybox to work on my wordpress site. The
   site uses magic fields to display a gallery of images. I use echo get_image to
   display the thumbnail that I have uploaded to the custom field ‘port_thumb’ in
   each post. I want it so that when I click on the thumbnail a larger image will
   open up in a fancybox on that same page. This is the code for the thumbnails.
 * `<li><?php echo get_image('port_thumb');?></li>`
 * How do I create the link for fancybox to the above code? Below is the code that
   i currently have directly above the ‘port_thumb’. ‘fb_zoom’ is another custom
   field that points in the direction for the larger images. Right now all this 
   does is open the larger image in a different page
 *     ```
       <a class="fancybox" rel="group" href="<?php bloginfo('template_directory'); ?
       >/images/images/zoom/<?php echo get('fb_zoom'); ?>">
       ```
   
 * I have tried following the guide on [http://fancybox.net/howto](http://fancybox.net/howto)
   but I am having a hard time understanding what to do when using PHP and magic
   fields.

The topic ‘Fancybox with magic fields. (Custom fields)’ is closed to new replies.

## Tags

 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)

 * 0 replies
 * 1 participant
 * Last reply from: [garydos34](https://wordpress.org/support/users/garydos34/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/fancybox-with-magic-fields-custom-fields/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
