tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'menu-1' => esc_html__( 'Primary', 'business-way-lite' ), 'menu-footer' => esc_html__( 'Footer', 'business-way-lite' ), ) ); /* * 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', ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'height' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); // Add support for Custom Header. add_theme_support( 'custom-header', apply_filters( 'business_way_custom_header_args', array( 'default-image' => get_template_directory_uri() . '/images/default-banner.png', 'width' => 1920, 'height' => 500, 'flex-height' => true, 'header-text' => false, ) ) ); // Register default headers. register_default_headers( array( 'business-way' => array( 'url' => '%s/images/default-banner.png', 'thumbnail_url' => '%s/images/default-banner.png', 'description' => esc_html_x( 'Business Way', 'header image description', 'business-way-lite' ), ), ) ); } endif; add_action( 'after_setup_theme', 'business_way_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function business_way_content_width() { $GLOBALS['content_width'] = apply_filters( 'business_way_content_width', 640 ); } add_action( 'after_setup_theme', 'business_way_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function business_way_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Primary Sidebar', 'business-way-lite' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here to appear in your primary sidebar.', 'business-way-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Secondary Sidebar', 'business-way-lite' ), 'id' => 'sidebar-2', 'description' => esc_html__( 'Add widgets here to appear in your secondary sidebar.', 'business-way-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); for ( $i = 1; $i <= 4; $i++ ) { register_sidebar( array( 'name' => sprintf( esc_html__( 'Footer %d', 'business-way-lite' ), $i ), 'id' => 'footer-' . $i, 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } } add_action( 'widgets_init', 'business_way_widgets_init' ); /** * Enqueue scripts and styles. */ function business_way_scripts() { $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/third-party/font-awesome/css/font-awesome' . $min . '.css', '', '4.7.0' ); $fonts_url = business_way_fonts_url(); if ( ! empty( $fonts_url ) ) { wp_enqueue_style( 'business-way-google-fonts', $fonts_url, array(), null ); } wp_enqueue_style( 'jquery-sidr', get_template_directory_uri() .'/third-party/sidr/css/jquery.sidr.dark' . $min . '.css', '', '2.2.1' ); wp_enqueue_style( 'business-way-style', get_stylesheet_uri(), array(), '1.0.0' ); wp_enqueue_script( 'jquery-sidr', get_template_directory_uri() . '/third-party/sidr/js/jquery.sidr' . $min . '.js', array( 'jquery' ), '2.2.1', true ); wp_enqueue_script( 'business-way-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true ); wp_enqueue_script( 'business-way-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true ); wp_enqueue_script( 'business-way-custom', get_template_directory_uri() . '/js/custom' . $min . '.js', array( 'jquery' ), '1.0.0', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'business_way_scripts' ); /** * Load init. */ require_once trailingslashit( get_template_directory() ) . 'inc/init.php';