Title: Attachment Custom Class
Last modified: December 27, 2017

---

# Attachment Custom Class

 *  [njb2018](https://wordpress.org/support/users/njb2018/)
 * (@njb2018)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/attachment-custom-class/)
 * Hi, firstly this is a fantastic plugin!!
 * I am creating a new gallery and see that the Custom Class for each attachment
   automatically renders in the link attribute for each attachment. How would I 
   echo the custom class for each attachment separately so that I can add it to 
   a different part of the gallery html? I have tried various methods such as $custom_class,
   $attachment->custom_class, but nothing is generated. Any help is greatly appreciated.
 * Thank you.

The topic ‘Attachment Custom Class’ is closed to new replies.

 * ![](https://ps.w.org/foogallery/assets/icon-256x256.gif?rev=2602542)
 * [Photo Gallery by FooGallery : Responsive Image Gallery, Masonry Gallery & Carousel](https://wordpress.org/plugins/foogallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/foogallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/foogallery/)
 * [Active Topics](https://wordpress.org/support/plugin/foogallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/foogallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/foogallery/reviews/)

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [njb2018](https://wordpress.org/support/users/njb2018/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/attachment-custom-class/)
 * Status: not resolved