Title: Help adding a href link to php code on my post template
Last modified: August 21, 2016

---

# Help adding a href link to php code on my post template

 *  [neostarmarketing](https://wordpress.org/support/users/neostarmarketing/)
 * (@neostarmarketing)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/help-adding-a-href-link-to-php-code-on-my-post-template/)
 * hi i am using custom fields to display a series of images in my modified post
   template and i cant seem to fugure out how to add the <a href= html tag to open
   the images in a lightbox when user clicks on it.
 * **here is my code:**
    <h3>My Photos</h3> <div id=”thumnail_class”> <div class
   =”thumnail_class”> <?php foreach($thumbnails as $user_submit_image){echo ‘<img
   src=”‘ . $user_submit_image . ‘” alt=”” rel=”lightbox” />’ ;} ?> </div></div>
 * Does anyone know where to add the html link code? i have tried many variations
   but no luck. Any help would be great appreciated.

The topic ‘Help adding a href link to php code on my post template’ is closed to
new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [neostarmarketing](https://wordpress.org/support/users/neostarmarketing/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/help-adding-a-href-link-to-php-code-on-my-post-template/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
