WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] Adding class to specific images in Carousel gallery (2 posts)

  1. Bitwize
    Member
    Posted 1 year ago #

    First off, I'd like to say that I'm not entirely sure if this is the best place to ask, or if it'd be better to be asked in the general support forum. The reason I chose here is because I'm using Jetpack/Carousel as the gallery, and I think it does edit/override some of the properties of the vanilla gallery.

    Basically what I'd like to add is the option of an individual class to each image (for display purposes).
    For example, in a 10-image gallery, perhaps the 3rd one has the class "award" which would make it look differently for having won an award.

    I know how to add new fields with a filter of 'attachment_fields_to_edit', I just want to find out how to apply it to the images thumbnails.

    Thanks to all who offer advice!

    http://wordpress.org/extend/plugins/jetpack/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Jetpack doesn't modify the core Gallery shortcode, but uses Javascript to add extra features to the galleries.

    You can do the same and use jQuery to add a specific class to the thumbnails. You can read more about it here:
    http://wordpress.stackexchange.com/a/45021/27574

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic