Title: [Plugin: Image Widget] Custom Classes
Last modified: August 20, 2016

---

# [Plugin: Image Widget] Custom Classes

 *  [jedifunk](https://wordpress.org/support/users/jedifunk/)
 * (@jedifunk)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-image-widget-custom-classes/)
 * First off… Love this plugin! I’ve been using it for about 6 months now, and its
   become one of the plugins I install at the beginning of any new project.
 * On my latest project, I’ve run into a situation where I need different images
   to function differently.
 * Specifically, I’d like to like the images to video’s hosted at Vimeo, but play
   in a Fancybox. I use Fancybox for WordPress to handle images, but have to do 
   a custom JS call that looks for the class of .vimeo to get a vimeo link to display
   in Fancybox.
 * What I would love to see is a Custom Class input box in the admin area of the
   Image Widget. This way I could selectively apply the .vimeo class to only those
   images that I need to play a video in Fancybox.
 * I looked at making a custom template, but I’m unsure of how to write the if/then
   statement to look for links to vimeo….
 * so again, I was hoping that it might be easy enough to add a dialog box to write
   my own custom classes.
 * Any help is greatly appreciated. Thanks.
 * [http://wordpress.org/extend/plugins/image-widget/](http://wordpress.org/extend/plugins/image-widget/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Peter Chester](https://wordpress.org/support/users/peterchester/)
 * (@peterchester)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-image-widget-custom-classes/#post-2712959)
 * I’ve been thinking about the possibility of launching a premium line of image-
   widget extensions for that sort of thing. In the interim (as it may take a while),
   you can override the admin template, the widget template and add a filter to 
   save the added data. The template override filter basically exists to let you
   have that level of customization if your comfortable with the coding.
 * I believe the filters are:
 * ‘sp_template_image-widget_widget.php’ for the widget display on the website.
   ‘
   sp_template_image-widget_widget-admin.php’ for the widget admin ui.
 * You can copy the widget.php and widget-admin.php files from the plugin /views/
   folder into your theme and then add filters in yout functions file to point to
   the files in your theme. By doing this you get all of the image-widget core functionality
   but you can control the details of the form input and the rendering.
 *  [ryansigg](https://wordpress.org/support/users/ryansigg/)
 * (@ryansigg)
 * [14 years ago](https://wordpress.org/support/topic/plugin-image-widget-custom-classes/#post-2712991)
 * I second this notion…
 * In the meantime I’ll try out those filters…
 *  Thread Starter [jedifunk](https://wordpress.org/support/users/jedifunk/)
 * (@jedifunk)
 * [14 years ago](https://wordpress.org/support/topic/plugin-image-widget-custom-classes/#post-2713017)
 * [@ryansigg](https://wordpress.org/support/users/ryansigg/) did you have any luck
   with the custom filters? i haven’t given them a go yet, but plan to soon.
 *  Thread Starter [jedifunk](https://wordpress.org/support/users/jedifunk/)
 * (@jedifunk)
 * [14 years ago](https://wordpress.org/support/topic/plugin-image-widget-custom-classes/#post-2713030)
 * just wanted to report back on my modifications.
 * i have successfully added a custom class field to the plugin, and all works as
   expected. i would explain how here, but it’s a bit long winded.
 * i looked to see if this plugin was on github but did not find it. i am more than
   happy to share how i did it if anyone is interested.
 * i would still like to see this added to the plugin itself so that i don’t have
   to modify it each time i want to use it.
 * please let me know the best way to go about getting the code to someone. thanks.
 *  [m.lan](https://wordpress.org/support/users/mlan/)
 * (@mlan)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-image-widget-custom-classes/#post-2713034)
 * hi,
    I use the Plugin: “image-widget” with the plugin [custom-widget-classes](http://wordpress.org/extend/plugins/custom-widget-classes/)
 * know I can choose in every widget a diffrent class 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[Plugin: Image Widget] Custom Classes’ is closed to new replies.

 * ![](https://ps.w.org/image-widget/assets/icon-256x256.png?rev=2489603)
 * [Image Widget](https://wordpress.org/plugins/image-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/image-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/image-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/image-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/image-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/image-widget/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [m.lan](https://wordpress.org/support/users/mlan/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-image-widget-custom-classes/#post-2713034)
 * Status: not resolved