tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support('title-tag'); /* gutrnberg */ add_theme_support( 'align-wide' ); /* Add theme support for selective refresh for widgets.*/ add_theme_support( 'customize-selective-refresh-widgets' ); /* * 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'); add_theme_support('woocommerce'); register_nav_menus(array( 'primary_menu' => __('Primary Menu', 'blogshining'), )); /* * Add support for 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, )); /* * Set up the WordPress core custom background feature. * * @link https://codex.wordpress.org/ */ add_theme_support('custom-background', array( 'default-image' => '', 'default-color' => 'fffff', )); /* * Set up custom header. * * @link https://developer.wordpress.org/themes/functionality/custom-headers */ add_theme_support('custom-header', array( 'default-image' => get_template_directory_uri() . '/assets/images/default-header-img.png', 'default-text-color' => '000000', 'width' => 1500, 'height' => 250, 'flex-height' => 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', ) ); } /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars */ function blogshining_widgets_init() { register_sidebar( array( 'name' => esc_html__('Sidebar', 'blogshining'), 'id' => 'sidebar-1', 'description' => esc_html__('Add widgets here.', 'blogshining'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action('widgets_init', 'blogshining_widgets_init'); /* * change excerpt length */ add_filter('excerpt_length', 'blogshining_excerpt_length'); function blogshining_excerpt_length($length){ if ( is_admin() ) return $length; return 40; } /** * Load WP Bootstrap NavWalker */ require_once get_template_directory() . '/assets/wp-bootstrap-navwalker.php'; /** * Load Custom Template hooks */ require get_template_directory() . '/inc/functions/template-hooks.php'; /** * Load Custom Template tags */ require get_template_directory() . '/inc/functions/template-tags.php'; /** * customizer additions */ require_once get_template_directory() . '/inc/functions/customizer.php'; /** * Load Jetpack compatibility file. */ if ( defined( 'JETPACK__VERSION' ) ) { require get_template_directory() . '/inc/jetpack.php'; } /** * Load WooCommerce compatibility file. */ if (class_exists('WooCommerce')) { require get_template_directory() . '/inc/woocommerce.php'; }