Skip to content

Instantly share code, notes, and snippets.

@thadallender
Created April 30, 2015 12:57
Show Gist options
  • Save thadallender/9c73546ebd01e3782fe3 to your computer and use it in GitHub Desktop.
Save thadallender/9c73546ebd01e3782fe3 to your computer and use it in GitHub Desktop.
Add classes to images on single entries in Sell Media
<?php
/**
* Add more classes to main images appearing on single entries in Sell Media.
* Change 'lightbox' below to whatever classes you want to add.
*/
function sell_media_filter_single_image_class( $classes ) {
if ( is_singular( 'sell_media_item' ) ) {
$classes[] = 'lightbox';
}
return $classes;
}
add_filter( 'sell_media_image_class', 'sell_media_filter_single_image_class' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment