Skip to content

Instantly share code, notes, and snippets.

@emzo
Created February 4, 2013 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emzo/4708969 to your computer and use it in GitHub Desktop.
Save emzo/4708969 to your computer and use it in GitHub Desktop.
Add slider slug name to css attributes of soliloquy container div
<?php
// Add slug in CSS class of all sliders
add_filter( 'tgmsp_slider_classes', 'clinicoftcm_slider_classes', 10, 2 );
function clinicoftcm_slider_classes( $classes, $id ) {
$slider = get_post( $id, ARRAY_A );
if( $slider['post_name'] )
$classes[] = 'soliloquy-' . $slider['post_name'];
return $classes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment