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 one location. register_nav_menus( array( 'menu-1' => esc_html__( 'Burger Menu', 'bizthems' ), 'menu-bar' => esc_html__( 'Menu Top Bar', 'bizthems' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'style', 'script', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'bizthems_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); } endif; // bizthems_setup add_action( 'after_setup_theme', 'bizthems_setup' ); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo' ); function bizthems_custom_logo_setup() { $defaults = array( 'height' => 100, 'width' => 400, 'flex-height' => true, 'flex-width' => true, 'header-text' => array( 'site-title', 'site-description' ), 'unlink-homepage-logo' => true, ); add_theme_support( 'custom-logo', $defaults ); } add_action( 'after_setup_theme', 'themename_custom_logo_setup' ); /** * Adjust content width for full-width page template */ function bizthems_adjusted_content_width() { global $content_width; if ( is_page_template( 'template-parts/full-width-page.php' ) || ( ! is_active_sidebar( 'sidebar-1' ) ) ) { $content_width = 1060; /* pixels */ } } add_action( 'template_redirect', 'bizthems_adjusted_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function bizthems_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'bizthems' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '