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' ); # Set the default content width. $GLOBALS['content_width'] = apply_filters( 'bizcorp_content_width', 1050 ); # Register menu locations. register_nav_menus( array( 'primary' => esc_html__( 'Primary Menu', 'bizcorp' ), 'social' => esc_html__( 'Social Menu', 'bizcorp' ) )); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'comment-list', 'gallery', 'caption', ) ); add_theme_support( 'custom-header', array( 'default-image' => get_parent_theme_file_uri( '/assets/images/placeholder/bizcorp-inner-banner-1920-450.jpg' ), 'width' => 1920, 'height' => 450, 'flex-height' => true, 'wp-head-callback' => 'bizcorp_header_style', )); register_default_headers( array( 'default-image' => array( 'url' => '%s/assets/images/placeholder/bizcorp-inner-banner-1920-450.jpg', 'thumbnail_url' => '%s/assets/images/placeholder/bizcorp-inner-banner-1920-450.jpg', 'description' => esc_html__( 'Default Header Image', 'bizcorp' ), ), ) ); # Set up the WordPress core custom background feature. add_theme_support( 'custom-background', array( 'default-color' => 'ffffff', )); # Enable support for selective refresh of widgets in Customizer. add_theme_support( 'customize-selective-refresh-widgets' ); # Enable support for custom logo. add_theme_support( 'custom-logo', array( 'width' => 265, 'height' => 75, 'flex-height' => true, 'flex-width' => true, ) ); /* * Enable support for Post Formats. * * See: https://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat', ) ); add_theme_support( 'infinite-scroll', array( 'container' => '#main-wrap', 'footer_widgets' => true, 'render' => 'bizcorp_infinite_scroll_render', )); add_theme_support( 'woocommerce' ); add_image_size( 'bizcorp-1920-450', 1920, 450, true ); add_image_size( 'bizcorp-1370-645', 1370, 645, true ); add_image_size( 'bizcorp-370-230', 370, 230, true ); add_image_size( 'bizcorp-390-320', 390, 320, true ); add_image_size( 'bizcorp-690-450', 690, 450, true ); add_image_size( 'bizcorp-670-500', 670, 500, true ); } add_action( 'after_setup_theme', 'bizcorp_setup' ); if( ! function_exists( 'bizcorp_infinite_scroll_render' ) ): /** * Set the code to be rendered on for calling posts, * hooked to template parts when possible. * * Note: must define a loop. */ function bizcorp_infinite_scroll_render(){ while ( have_posts() ) : the_post(); get_template_part( 'template-parts/archive/content', '' ); endwhile; wp_reset_postdata(); } endif; if( ! function_exists( 'bizcorp_header_style' ) ): /** * Styles the header image and text displayed on the blog. * * @see bizcorp_setup(). */ function bizcorp_header_style(){ $header_text_color = get_header_textcolor(); # If no custom options for text are set, let's bail. # get_header_textcolor() options: add_theme_support( 'custom-header' ) is default, hide text (returns 'blank') or any hex value. if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) { return; } # If we get this far, we have custom styles. Let's do this. ?> esc_html__( 'Right Sidebar', 'bizcorp' ), 'id' => 'right-sidebar', 'description' => esc_html__( 'Add widgets here.', 'bizcorp' ), 'before_widget' => '
', 'before_title' => '