Created
July 18, 2012 16:06
-
-
Save stuartduff/3137178 to your computer and use it in GitHub Desktop.
Woo Business Slider Canvas Portfolio Page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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