'', 'width' => 1000, 'height' => 250, 'flex-width' => true, 'flex-height' => true, )); // Add support for custom background add_theme_support('custom-background', array( 'default-color' => 'ffffff', )); // Add editor styles add_editor_style('editor-style.css'); // Register nav menus register_nav_menus(array( 'primary' => esc_html__('Primary Menu', 'blog-desheecode'), 'footer' => esc_html__('Footer Menu', 'blog-desheecode'), )); // Add theme support for selective refresh for widgets. add_theme_support('customize-selective-refresh-widgets'); // Add support for core custom logo. add_theme_support('custom-logo', array( 'height' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, )); // Add support for full and wide align images. add_theme_support('align-wide'); // Add support for responsive embeds. add_theme_support('responsive-embeds'); } add_action('after_setup_theme', 'blog_desheecode_setup'); /** * Register block patterns */ function blog_desheecode_register_block_patterns() { register_block_pattern( 'blog-desheecode/hero-section', array( 'title' => __('Hero Section', 'blog-desheecode'), 'description' => __('A hero section with heading and text', 'blog-desheecode'), 'content' => '

Welcome to Blog Desheecode

A modern WordPress theme for bloggers

', ) ); } add_action('init', 'blog_desheecode_register_block_patterns'); /** * Register block styles */ function blog_desheecode_register_block_styles() { register_block_style( 'core/quote', array( 'name' => 'blue-quote', 'label' => __('Blue Quote', 'blog-desheecode'), 'inline_style' => '.is-style-blue-quote { border-left-color: #0073aa; }', ) ); } add_action('init', 'blog_desheecode_register_block_styles'); /** * Register widget area. */ function blog_desheecode_widgets_init() { register_sidebar(array( 'name' => esc_html__('Sidebar', 'blog-desheecode'), 'id' => 'sidebar-1', 'description' => esc_html__('Add widgets here.', 'blog-desheecode'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } add_action('widgets_init', 'blog_desheecode_widgets_init'); /** * Enqueue scripts and styles. */ function blog_desheecode_scripts() { wp_enqueue_style('blog-desheecode-style', get_stylesheet_uri(), array(), _S_VERSION); wp_enqueue_script('blog-desheecode-navigation', get_template_directory_uri() . '/js/navigation.js', array(), _S_VERSION, true); if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } } add_action('wp_enqueue_scripts', 'blog_desheecode_scripts'); /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Functions which enhance the theme by hooking into WordPress. */ require get_template_directory() . '/inc/template-functions.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php';