Guest User

Untitled

a guest
Jan 23rd, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. // Display the "Business" slider above the default WordPress homepage.
  2. add_action( 'get_header', 'woo_custom_load_biz_slider', 10 );
  3.  
  4. function woo_custom_load_biz_slider () {
  5. if ( is_page( 'about' ) && ! is_paged() ) {
  6. add_action( 'woo_main_before', 'woo_slider_biz', 10 );
  7. add_action( 'woo_main_before', 'woo_custom_reset_biz_query', 11 );
  8. add_action( 'woo_load_slider_js', '__return_true', 10 );
  9. add_filter( 'body_class', 'woo_custom_add_business_bodyclass', 10 );
  10. }
  11. } // End woo_custom_load_biz_slider()
  12.  
  13. function woo_custom_add_business_bodyclass ( $classes ) {
  14. if ( is_page( 'about' ) ) {
  15. $classes[] = 'business';
  16. }
  17. return $classes;
  18. } // End woo_custom_add_biz_bodyclass()
  19.  
  20. function woo_custom_reset_biz_query () {
  21. wp_reset_query();
  22. } // End woo_custom_reset_biz_query()
Add Comment
Please, Sign In to add comment