Title: CSS class
Last modified: May 25, 2017

---

# CSS class

 *  Resolved [StevenW123](https://wordpress.org/support/users/stevenw123/)
 * (@stevenw123)
 * [9 years ago](https://wordpress.org/support/topic/css-class-12/)
 * Hi,
 * I really like your plugin but I have one small problem that maybe you could help
   with, please.
 * Is there any way to add a CSS class to an image so that when that image is clicked
   it opens a modal optin form (created with Convertplug plugin, if that’s any help),
   please?
 * Thanks,
    Steve

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

 *  Plugin Contributor [András Guseo](https://wordpress.org/support/users/aguseo/)
 * (@aguseo)
 * [9 years ago](https://wordpress.org/support/topic/css-class-12/#post-9181363)
 * Hey [@stevenw123](https://wordpress.org/support/users/stevenw123/),
 * Adding a css class cannot be done through the settings or options. But you can
   add that manually if you edit one of the plugin files. Note however, that this
   change will be lost when the plugin receives an update, so you will need to do
   the edit again.
 * Here’s the change you need to do:
    Open the _image-widget.php_ file for editing.
 * Line 253 should look like this:
    `'class' => $this->widget_options['classname'].'-
   image-link',`
 * Change it to this:
    `'class' => $this->widget_options['classname'] . '-image-
   link extra-class-name',`
 * Obviously change the “extra-class-name” to the one that you need.
 * I hope this helps. Let me know.
 * Cheers,
    Andras
 *  Thread Starter [StevenW123](https://wordpress.org/support/users/stevenw123/)
 * (@stevenw123)
 * [9 years ago](https://wordpress.org/support/topic/css-class-12/#post-9182567)
 * Hi Andras,
 * That’s great. It’s going to be really useful. Thanks for taking the time to provide
   extra code. Much appreciated. You’re a star, Andras!
 * Best,
    Steve
 *  Plugin Contributor [András Guseo](https://wordpress.org/support/users/aguseo/)
 * (@aguseo)
 * [9 years ago](https://wordpress.org/support/topic/css-class-12/#post-9185281)
 * Thanks for the kind words. 🙂 I’m happy I could be of help.
 * Cheers,
    Andras

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

The topic ‘CSS class’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [András Guseo](https://wordpress.org/support/users/aguseo/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/css-class-12/#post-9185281)
 * Status: resolved