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( 'bizplan_content_width', 1050 ); # Register menu locations. register_nav_menus( array( 'primary' => esc_html__( 'Primary Menu', 'bizplan' ), )); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, and column width. */ add_editor_style( array( 'assets/css/editor-style.css' ) ); /* * 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', 'search-form', 'caption', ) ); add_theme_support( 'custom-header', array( 'width' => 1140, 'height' => 300, 'flex-height' => true, 'default-image' => get_parent_theme_file_uri( '/assets/images/placeholder/inner-banner.jpg' ), 'wp-head-callback' => 'bizplan_header_style', )); # 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' => 'bizplan_infinite_scroll_render', )); add_theme_support( 'woocommerce' ); add_image_size( 'kt-1142-500', 1142, 500, true ); add_image_size( 'kt-370-230', 370, 230, true ); add_image_size( 'kt-390-320', 390, 320, true ); add_image_size( 'kt-690-450', 690, 450, true ); add_image_size( 'kt-670-500', 670, 500, true ); } add_action( 'after_setup_theme', 'bizplan_setup' ); if( ! function_exists( 'bizplan_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 bizplan_infinite_scroll_render(){ while ( have_posts() ) : the_post(); get_template_part( 'template-parts/archive/content', '' ); endwhile; wp_reset_postdata(); } endif; if( ! function_exists( 'bizplan_header_style' ) ): /** * Styles the header image and text displayed on the blog. * * @see bizplan_setup(). */ function bizplan_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', 'bizplan' ), 'id' => 'right-sidebar', 'description' => esc_html__( 'Add widgets here.', 'bizplan' ), 'before_widget' => '
', 'before_title' => '