__( 'Primary Menu', 'business-a' ), 'footer' => __( 'Footer Menu', 'business-a' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); /* * Custom logo * Add theme support for custom logo. https://codex.wordpress.org/Theme_Logo */ $args = array( 'flex-width' => true, 'height' => 39, ); add_theme_support( 'custom-logo', $args ); // Add custom header support. https://codex.wordpress.org/Custom_Headers $args = array( 'width' => 1600, 'flex-width' => true, 'default-image' => get_template_directory_uri() . '/images/seprator_back.jpg', // Header text 'header-text' => false, ); add_theme_support( 'custom-header', $args ); $header_image = array( 'library' => array( 'url' => get_template_directory_uri() . '/images/seprator_back.jpg', 'thumbnail_url' => get_template_directory_uri() . '/images/seprator_back.jpg', 'description' => 'Library Ceiling', ), ); register_default_headers( $header_image ); // Add custom background support. https://codex.wordpress.org/Custom_Backgrounds add_theme_support( 'custom-background', array( 'default-color' => 'ffffff', ) ); /* * woocommerce support */ add_theme_support( 'woocommerce' ); add_editor_style(); } endif; // business_a_setup add_action( 'after_setup_theme', 'business_a_setup' ); // wp title function business_a_title( $title, $sep ) { global $paged, $page; if( is_home() ){ return $title; } if ( is_feed() ) return $title; // Add the site name. $title .= esc_html( get_bloginfo( 'name' ) ); // Add the site description for the home/front page. $site_description = esc_html( get_bloginfo( 'description' ) ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( _e( 'Page', 'business-a' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'business_a_title', 10,2 ); /** * Add appropriate classes to body tag. * */ function business_a_body_classes( $classes ) { $business_obj = new business_a_settings_array(); $option = wp_parse_args( get_option( 'business_option', array() ), $business_obj->default_data() ); if ( $option['layout'] == true ) { $classes[] = 'boxed'; } return $classes; } add_filter( 'body_class', 'business_a_body_classes' );