100, 'width' => 400, 'flex-width' => true, 'flex-height' => true, ) ); add_theme_support( 'custom-header', array( 'width' => 1920, 'height' => 300, 'flex-height' => true, 'header-text' => false, 'unlink-homepage-logo' => true, ) ); add_theme_support( 'customizer' ); add_theme_support( 'woocommerce' ); add_theme_support( 'custom-background', array( 'default-color' => '', 'default-image' => '', 'default-repeat' => '', 'default-position-x' => '', 'default-attachment' => '', ) ); add_theme_support( 'align-wide' ); } ); //------------------Include Bootstap--------------- function blog_sphere_enqueue_styles() { wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css' ); wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array( 'jquery' ), '', true ); wp_enqueue_script( 'blog-sphere-menu-js', get_template_directory_uri() . '/menu/menu.js', array( 'jquery' ), '1.0', true ); wp_enqueue_style( 'blog-sphere-menu-css', get_template_directory_uri() . '/menu/menu.css', array(), '1.0', 'all' ); wp_enqueue_style( 'blog-sphere-customizer-css', get_stylesheet_directory_uri() . '/inc/customizer-button/customizer-custom.css' ); wp_enqueue_script( 'blog-sphere-back-to-top', get_template_directory_uri() . '/assets/js/custom.js', array(), null, true ); //---------------Color selector file adding-- wp_enqueue_style( 'color-selector-blog-sphere', get_stylesheet_uri() ); require get_parent_theme_file_path( '/inc/color-selector.php' ); wp_add_inline_style( 'color-selector-blog-sphere',$custom_css ); } add_action( 'wp_enqueue_scripts', 'blog_sphere_enqueue_styles' ); //-------------------Loading Fonts Locally----------- function blog_sphere_enqueue_assets() { // Include the file. require_once get_theme_file_path( 'inc/wptt-webfont-loader.php' ); // Load the theme stylesheet. wp_enqueue_style( 'style1-blog-sphere', get_stylesheet_directory_uri() . '/style.css', array(), '1.0' ); // Load the webfont. wp_add_inline_style( 'style2-blog-sphere', wptt_get_webfont_styles( 'https://fonts.googleapis.com/css2?family=Literata&display=swap' ) ); } add_action( 'wp_enqueue_scripts', 'blog_sphere_enqueue_assets' ); //-------------------------Header Code-------------------------------- //--------------------My Menu Registration----- // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'blog-sphere' ), ) ); //---------------------------My Menu--------------------------------- if( ! function_exists( 'blog_sphere_primary_nagivation' ) ) : /** * Primary Navigation. */ function blog_sphere_primary_nagivation(){ ?> '; echo '
This is my custom block pattern
', ) ); } } add_action( 'init', 'blog_sphere_register_block_patterns' ); function blog_sphere_add_editor_styles() { add_editor_style( 'editor-style.css' ); } add_action( 'admin_init', 'blog_sphere_add_editor_styles' ); //------------------------Comments------------- function blog_sphere_enable_threaded_comments() { if (is_singular() && comments_open() && (get_option('thread_comments') == 1)) { wp_enqueue_script('comment-reply'); } } add_action('wp_enqueue_scripts', 'blog_sphere_enable_threaded_comments'); // ----------------------------Menu navigation keyboard-------------- function blog_sphere_add_tabindex_to_menu_items( $atts, $item, $args, $depth ) { // Add tabindex="0" to the menu item $atts['tabindex'] = '0'; return $atts; } add_filter( 'nav_menu_link_attributes', 'blog_sphere_add_tabindex_to_menu_items', 10, 4 ); //--------------------Define-------------------- define('BLOG_SPHERE_PRO_URL',__('https://cawpthemes.com/blog-sphere-premium-wordpress-theme/','blog-sphere')); define('BLOG_SPHERE_PRO_SUPPORT',__('https://cawpthemes.com/support/','blog-sphere')); define('BLOG_SPHERE_PRO_DEMO',__('https://demo.cawpthemes.com/blog-sphere-pro/','blog-sphere')); define('BLOG_SPHERE_PRO_DOCUMENTATION',__('https://cawpthemes.com/docs/blog-sphere-free-theme-documentation/','blog-sphere'));