• Resolved nnarang

    (@nnarang)


    Hi,

    I’m working on creating a gallery in which each image must have a custom link. Additionally, I need to add a Custom CSS Class to each of these links. While this app easily adds custom link functionality, I cannot find a way to add a Custom CSS Class.

    Is it possible to add a Custom CSS Class with this plugin? Any advice would be greatly appreciated.

    https://ww.wp.xz.cn/plugins/wp-gallery-custom-links/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I might be able to add something like this in the future, but at this time there’s not a way to add custom classes per link using this plugin, sorry.

    You may be able to do something like the following using jQuery for each link in your site footer if you have no other options:

    jQuery('#gallery-2 a[href$="some-url.com"]').addClass('some-class');

    Just FYI, the new version 1.10.0 has the ability to add css classes to each link in the gallery:

    https://ww.wp.xz.cn/plugins/wp-gallery-custom-links/faq/

    Once you have a css class on the link, you should be able to select its image by using jQuery(‘.someclass img’), so hopefully this helps.

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

The topic ‘Adding Custom CSS Class to each Custom Link’ is closed to new replies.