Skip to content

Instantly share code, notes, and snippets.

@stuartduff
Created July 18, 2012 16:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stuartduff/3137178 to your computer and use it in GitHub Desktop.
Save stuartduff/3137178 to your computer and use it in GitHub Desktop.
Woo Business Slider Canvas Portfolio Page
// Display the "Business" slider above the default WordPress homepage.
add_action( 'get_header', 'woo_custom_load_biz_slider', 10 );
function woo_custom_load_biz_slider () {
if ( is_page('portfolio') ) {
add_action( 'woo_content_before', 'woo_slider_biz', 10 );
add_action( 'woo_content_before', 'woo_custom_reset_biz_query', 11 );
add_action( 'woo_load_slider_js', '__return_true', 10 );
add_filter( 'body_class', 'woo_custom_add_business_bodyclass', 10 );
}
} // End woo_custom_load_biz_slider()
function woo_custom_add_business_bodyclass ( $classes ) {
if ( is_page('portfolio') ) {
$classes[] = 'business';
}
return $classes;
} // End woo_custom_add_biz_bodyclass()
function woo_custom_reset_biz_query () {
wp_reset_query();
} // End woo_custom_reset_biz_query()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment