__( 'Header Menu', 'ycb' ), ) ); // Enable support for footer widgets. add_theme_support( 'genesis-footer-widgets', 4 ); // Enable viewport meta tag for mobile browsers. add_theme_support( 'genesis-responsive-viewport' ); // Enable HTML5 markup structure. add_theme_support( 'html5', array( 'caption', 'comment-form', 'comment-list', 'gallery', 'search-form', ) ); // Enable support for post formats. add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video', ) ); // Enable support for post thumbnails. add_theme_support( 'post-thumbnails' ); // Enable automatic output of WordPress title tags. add_theme_support( 'title-tag' ); // Enable support for WooCommerce. add_theme_support( 'woocommerce' ); // Enable selective refresh and Customizer edit icons. add_theme_support( 'customize-selective-refresh-widgets' ); // Enable theme support for custom background image. add_theme_support( 'custom-background', array( 'default-color' => 'f4f5f6', ) ); // Enable logo option in Customizer > Site Identity. add_theme_support( 'custom-logo', array( 'height' => 100, 'width' => 300, 'flex-height' => true, 'flex-width' => true, 'header-text' => array( '.site-title', '.site-description' ), ) ); // Display custom logo. add_action( 'genesis_site_title', 'the_custom_logo', 1 ); // Enable support for custom header image or video. add_theme_support( 'custom-header', array( 'header-selector' => 'false', 'default_image' => get_stylesheet_directory_uri() . '/assets/images/hero.jpg', 'header-text' => true, 'default-text-color' => 'ffffff', 'width' => 1920, 'height' => 1080, 'flex-height' => true, 'flex-width' => true, 'uploads' => true, 'video' => true, ) ); // Register default header (just in case). register_default_headers( array( 'child' => array( 'url' => '%2$s/assets/images/hero.jpg', 'thumbnail_url' => '%2$s/assets/images/hero.jpg', 'description' => __( 'Hero Image', 'ycb' ), ), ) ); // Register custom layout. genesis_register_layout( 'centered-content', array( 'label' => __( 'Centered Content', 'ycb' ), 'img' => get_stylesheet_directory_uri() . '/assets/images/layout.gif', ) ); // Register front page widget areas. genesis_register_sidebar( array( 'id' => 'front-page-1', 'name' => __( 'Front Page 1', 'ycb' ), 'description' => __( 'This is the Front Page 1 widget area.', 'ycb' ), ) ); genesis_register_sidebar( array( 'id' => 'front-page-2', 'name' => __( 'Front Page 2', 'ycb' ), 'description' => __( 'This is the Front Page 2 widget area.', 'ycb' ), ) ); genesis_register_sidebar( array( 'id' => 'front-page-3', 'name' => __( 'Front Page 3', 'ycb' ), 'description' => __( 'This is the Front Page 3 widget area.', 'ycb' ), ) ); genesis_register_sidebar( array( 'id' => 'front-page-4', 'name' => __( 'Front Page 4', 'ycb' ), 'description' => __( 'This is the Front Page 4 widget area.', 'ycb' ), ) ); genesis_register_sidebar( array( 'id' => 'front-page-5', 'name' => __( 'Front Page 5', 'ycb' ), 'description' => __( 'This is the Front Page 5 widget area.', 'ycb' ), ) ); genesis_register_sidebar( array( 'id' => 'front-page-6', 'name' => __( 'Front Page 6', 'ycb' ), 'description' => __( 'This is the Front Page 6 widget area.', 'ycb' ), ) ); // Register before footer widget area. genesis_register_sidebar( array( 'id' => 'before-footer', 'name' => __( 'Before Footer', 'ycb' ), 'description' => __( 'This is the before footer widget area.', 'ycb' ), ) ); add_action( 'genesis_footer', 'business_before_footer_widget_area', 5 ); /** * Display before-footer widget area. * * @since 1.0.0 * * @return void */ function business_before_footer_widget_area() { genesis_widget_area( 'before-footer', array( 'before' => '
', ) ); } add_action( 'wp_enqueue_scripts', 'business_scripts_styles', 99 ); /** * Enqueue theme scripts and styles. * * @since 1.0.0 * * @return void */ function business_scripts_styles() { // Remove Simple Social Icons CSS (included with theme). wp_dequeue_style( 'simple-social-icons-font' ); // Enqueue Google fonts. wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Montserrat:600|Hind:400', array(), CHILD_THEME_VERSION ); // Enqueue Line Awesome icon font. wp_enqueue_style( 'line-awesome', '//maxcdn.icons8.com/fonts/line-awesome/1.1/css/line-awesome-font-awesome.min.css', array(), CHILD_THEME_VERSION ); // Enqueue WooCommerce styles conditionally. if ( class_exists( 'WooCommerce' ) && ( is_woocommerce() || is_front_page() || is_shop() || is_product_category() || is_product_tag() || is_product() || is_cart() || is_checkout() || is_account_page() ) ) { wp_enqueue_style( 'ycb-woocommerce', get_stylesheet_directory_uri() . '/assets/styles/min/woocommerce.min.css', array(), CHILD_THEME_VERSION ); } // Enqueue theme scripts. wp_enqueue_script( 'ycb', get_stylesheet_directory_uri() . '/assets/scripts/min/ycb.min.js', array( 'jquery' ), CHILD_THEME_VERSION, true ); // Enqueue responsive menu script. wp_enqueue_script( 'ycb-menu', get_stylesheet_directory_uri() . '/assets/scripts/min/menus.min.js', array( 'jquery' ), CHILD_THEME_VERSION, true ); // Localize responsive menus script. wp_localize_script( 'ycb-menu', 'genesis_responsive_menu', array( 'mainMenu' => __( 'Menu', 'ycb' ), 'subMenu' => __( 'Menu', 'ycb' ), 'menuIconClass' => null, 'subMenuIconClass' => null, 'menuClasses' => array( 'combine' => array( '.nav-primary', ), ), ) ); } // Load theme helper functions. include_once( get_stylesheet_directory() . '/includes/helpers.php' ); // Load Customizer settings and output. include_once( get_stylesheet_directory() . '/includes/customize.php' ); // Load default settings for the theme. include_once( get_stylesheet_directory() . '/includes/defaults.php' ); // Load theme's recommended plugins. include_once( get_stylesheet_directory() . '/includes/plugins.php' ); //* Remove the default header remove_action( 'genesis_header', 'genesis_do_header' ); //* Add Site Title in custom header add_action( 'genesis_header', 'ycb_do_header' ); function ycb_do_header() { if( function_exists( 'ubermenu' ) ) { ubermenu( 'main' , array( 'menu' => 16 ) ); wp_enqueue_style( 'ycb-ubermenu', get_stylesheet_directory_uri() . '/ubermenu.css', array(), CHILD_THEME_VERSION ); } genesis_markup( array( 'html5' => '