• Resolved StevenW123

    (@stevenw123)


    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 Andras Guseo

    (@aguseo)

    Hey @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

    (@stevenw123)

    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 Andras Guseo

    (@aguseo)

    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.