Home › Forums › ASE Support › adding custom class to gallery component › Reply To: adding custom class to gallery component
Hey Julie,
What does your “bernie” class CSS look like?
You will notice that we registered $stacked_styles = 'background-size:cover;background-position:center center';
(see https://github.com/bearded-avenger/aesop-core/blob/master/public/includes/components/component-gallery.php#L236), for the stacked gallery, so every stacked gallery is a cover image that is center center. My guess is that the filter is not overriding this because it will require a little more logic.
See more on the gallery custom post type here to create an option for center top if you just want that on specific stacked galleries: https://github.com/bearded-avenger/aesop-core/blob/master/admin/includes/components/component-gallery.php.
Here’s what our styles look like for the stacked parallax: https://github.com/bearded-avenger/aesop-core/blob/master/public/assets/less/components/gallery.less.
By the way, it may be helpful to check out our Sample Add-on: https://github.com/AesopInteractive/sample-addon.