__('Primary Menu', 'arcs'), // Primary menu location 'footer' => __('Footer Menu', 'arcs'), // Footer menu location )); // Enable support for HTML5 markup add_theme_support('html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', )); // Add theme support for title tag add_theme_support('title-tag'); // Add custom image size for home featured images add_image_size('home-featured', 680, 300, array('center', 'center')); // Set up custom background feature add_theme_support('custom-background', apply_filters('arcs_custom_background_args', array( 'default-color' => 'ffffff', // Default background color 'default-image' => '', // Default background image ))); // Add support for block styles add_theme_support('wp-block-styles'); // Add support for responsive embedded content add_theme_support('responsive-embeds'); // Register primary navigation menu again (not needed if already registered) register_nav_menus(array( 'primary' => __('Primary Menu', 'arcs') )); } add_action('after_setup_theme', 'arcs_setup'); //header // Register Customizer Settings and Controls for Header function custom_header_customizer_settings($wp_customize) { // Header Section $wp_customize->add_section('custom_header_section', array( 'title' => __('Custom Header', 'arcs'), 'priority' => 30, )); // Background Color $wp_customize->add_setting('header_background_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'header_background_color', array( 'label' => __('Background Color', 'arcs'), 'section' => 'custom_header_section', 'settings' => 'header_background_color', ))); // Background Image $wp_customize->add_setting('header_background_image', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'header_background_image', array( 'label' => __('Background Image', 'arcs'), 'section' => 'custom_header_section', 'settings' => 'header_background_image', ))); // Background Image Properties $wp_customize->add_setting('header_background_properties', array( 'default' => 'cover', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('header_background_properties', array( 'label' => __('Background Image Properties', 'arcs'), 'section' => 'custom_header_section', 'settings' => 'header_background_properties', 'type' => 'select', 'choices' => array( 'cover' => __('Cover', 'arcs'), 'contain' => __('Contain', 'arcs'), 'auto' => __('Auto', 'arcs'), 'initial' => __('Initial', 'arcs'), ), )); } add_action('customize_register', 'custom_header_customizer_settings'); //menu-section // Register Customizer Settings and Controls for Header Menu function custom_header_menu_customizer_settings($wp_customize) { // Header Menu Section $wp_customize->add_section('header_menu_section', array( 'title' => __('Header Menu', 'arcs'), 'priority' => 31, )); // Font Size $wp_customize->add_setting('header_menu_font_size', array( 'default' => '16px', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('header_menu_font_size', array( 'label' => __('Font Size', 'arcs'), 'section' => 'header_menu_section', 'type' => 'text', )); // Font Weight $wp_customize->add_setting('header_menu_font_weight', array( 'default' => 'normal', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('header_menu_font_weight', array( 'label' => __('Font Weight', 'arcs'), 'section' => 'header_menu_section', 'type' => 'select', 'choices' => array( 'light' => __('Light', 'arcs'), 'normal' => __('Regular', 'arcs'), 'bold' => __('Bold', 'arcs'), ), )); // Font Style $wp_customize->add_setting('header_menu_font_style', array( 'default' => 'normal', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('header_menu_font_style', array( 'label' => __('Font Style', 'arcs'), 'section' => 'header_menu_section', 'type' => 'select', 'choices' => array( 'normal' => __('Normal', 'arcs'), 'italic' => __('Italic', 'arcs'), 'oblique' => __('Oblique', 'arcs'), 'unset' => __('Unset', 'arcs'), 'revert' => __('Revert', 'arcs'), 'revert-layer' => __('Revert-layer', 'arcs'), 'initial' => __('Initial', 'arcs'), 'inherit' => __('Inherit', 'arcs'), ), )); // Line Height $wp_customize->add_setting('header_menu_line_height', array( 'default' => '1.5', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('header_menu_line_height', array( 'label' => __('Line Height', 'arcs'), 'section' => 'header_menu_section', 'type' => 'text', )); // Font Color $wp_customize->add_setting('header_menu_font_color', array( 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'header_menu_font_color', array( 'label' => __('Font Color', 'arcs'), 'section' => 'header_menu_section', 'settings' => 'header_menu_font_color', ))); // Border Width $wp_customize->add_setting('header_menu_border_width', array( 'default' => '1px', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('header_menu_border_width', array( 'label' => __('Border Width', 'arcs'), 'section' => 'header_menu_section', 'type' => 'text', )); // Border Style $wp_customize->add_setting('header_menu_border_style', array( 'default' => 'solid', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('header_menu_border_style', array( 'label' => __('Border Style', 'arcs'), 'section' => 'header_menu_section', 'type' => 'select', 'choices' => array( 'none' => __('None', 'arcs'), 'solid' => __('Solid', 'arcs'), 'dotted' => __('Dotted', 'arcs'), // Add more border styles as needed ), )); // Border Color $wp_customize->add_setting('header_menu_border_color', array( 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'header_menu_border_color', array( 'label' => __('Border Color', 'arcs'), 'section' => 'header_menu_section', 'settings' => 'header_menu_border_color', ))); } add_action('customize_register', 'custom_header_menu_customizer_settings'); // Burger Area Section function arcs_customizer_burger_section( $wp_customize ) { // Add section for burger customization $wp_customize->add_section( 'burger_customization_section', array( 'title' => __( 'Burger Customization', 'arcs' ), 'priority' => 30, ) ); // Add setting for background color $wp_customize->add_setting( 'burger_background_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', ) ); // Add control for background color $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'burger_background_color', array( 'label' => __( 'Background Color', 'arcs' ), 'section' => 'burger_customization_section', 'settings' => 'burger_background_color', ) ) ); // Add setting for color $wp_customize->add_setting( 'burger_color', array( 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color', ) ); // Add control for color $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'burger_color', array( 'label' => __( 'Color', 'arcs' ), 'section' => 'burger_customization_section', 'settings' => 'burger_color', ) ) ); // Add setting for font size $wp_customize->add_setting( 'burger_font_size', array( 'default' => '16px', 'sanitize_callback' => 'sanitize_text_field', ) ); // Add control for font size $wp_customize->add_control( 'burger_font_size', array( 'type' => 'text', 'label' => __( 'Font Size', 'arcs' ), 'section' => 'burger_customization_section', 'input_attrs' => array( 'style' => 'width: 100px;', // Adjust the width as needed ), ) ); } add_action( 'customize_register', 'arcs_customizer_burger_section' ); //banner function custom_banner_customizer_section($wp_customize) { $wp_customize->add_section('custom_banner_section', array( 'title' => __('Banner Settings', 'arcs'), 'priority' => 30, )); // Background Image $wp_customize->add_setting('banner_background_image', array( 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'banner_background_image', array( 'label' => __('Background Image', 'arcs'), 'section' => 'custom_banner_section', 'settings' => 'banner_background_image', ))); // Background Color $wp_customize->add_setting('banner_background_color', array( 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'banner_background_color', array( 'label' => __('Background Color', 'arcs'), 'section' => 'custom_banner_section', 'settings' => 'banner_background_color', ))); // Background Gradient $wp_customize->add_setting('banner_background_gradient', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('banner_background_gradient', array( 'label' => __('Background Gradient', 'arcs'), 'section' => 'custom_banner_section', 'type' => 'text', // You might want to use a custom control for gradient input )); // Background Position $wp_customize->add_setting('banner_background_position', array( 'default' => 'center center', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('banner_background_position', array( 'label' => __('Background Position', 'arcs'), 'section' => 'custom_banner_section', 'type' => 'text', )); // Background Size $wp_customize->add_setting('banner_background_size', array( 'default' => 'cover', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('banner_background_size', array( 'label' => __('Background Size', 'arcs'), 'section' => 'custom_banner_section', 'type' => 'text', )); // Background Repeat $wp_customize->add_setting('banner_background_repeat', array( 'default' => 'no-repeat', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('banner_background_repeat', array( 'label' => __('Background Repeat', 'arcs'), 'section' => 'custom_banner_section', 'type' => 'text', )); // Background Attachment $wp_customize->add_setting('banner_background_attachment', array( 'default' => 'scroll', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('banner_background_attachment', array( 'label' => __('Background Attachment', 'arcs'), 'section' => 'custom_banner_section', 'type' => 'text', )); // Dynamic Heading $wp_customize->add_setting('banner_dynamic_heading', array( 'default' => 'Your Default Heading', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('banner_dynamic_heading', array( 'label' => __('Dynamic Heading', 'arcs'), 'section' => 'custom_banner_section', 'type' => 'text', )); // Dynamic Text $wp_customize->add_setting('banner_dynamic_text', array( 'default' => 'Your Default Text', 'sanitize_callback' => 'wp_kses_post', )); $wp_customize->add_control('banner_dynamic_text', array( 'label' => __('Dynamic Text', 'arcs'), 'section' => 'custom_banner_section', 'type' => 'textarea', )); } add_action('customize_register', 'custom_banner_customizer_section'); //widget function arcs_widgets_init() { register_sidebar(array( 'name' => __('Primary Sidebar', 'arcs'), 'id' => 'main-sidebar', 'description' => 'Main Sidebar on Right Side', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __('Home Banner', 'arcs'), 'id' => 'home-banner', 'description' => 'Banner Area on Homepage', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __('Home Services', 'arcs'), 'id' => 'home-services', 'description' => 'Services Area on Homepage', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __('Footer widget 1', 'arcs'), 'id' => 'footer-1', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __('Footer widget 2', 'arcs'), 'id' => 'footer-2', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __('Footer widget 3', 'arcs'), 'id' => 'footer-3', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } add_action('widgets_init', 'arcs_widgets_init'); //footer background customization function customize_footer_background($wp_customize) { // Add section for footer background customization $wp_customize->add_section('footer_background_section', array( 'title' => __('Footer Background', 'arcs'), 'priority' => 30, )); // Background Color $wp_customize->add_setting('footer_background_color', array( 'default' => '#3498db', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'footer_background_color', array( 'label' => __('Background Color', 'arcs'), 'section' => 'footer_background_section', ))); // Background Gradient $wp_customize->add_setting('footer_background_gradient', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('footer_background_gradient', array( 'label' => __('Background Gradient', 'arcs'), 'section' => 'footer_background_section', )); // Background Image $wp_customize->add_setting('footer_background_image', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'footer_background_image', array( 'label' => __('Background Image', 'arcs'), 'section' => 'footer_background_section', ))); // Background Position $wp_customize->add_setting('footer_background_position', array( 'default' => 'center center', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('footer_background_position', array( 'label' => __('Background Position', 'arcs'), 'section' => 'footer_background_section', )); // Background Size $wp_customize->add_setting('footer_background_size', array( 'default' => 'cover', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('footer_background_size', array( 'label' => __('Background Size', 'arcs'), 'section' => 'footer_background_section', )); // Background Attachment $wp_customize->add_setting('footer_background_attachment', array( 'default' => 'fixed', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('footer_background_attachment', array( 'label' => __('Background Attachment', 'arcs'), 'section' => 'footer_background_section', )); // Background Opacity $wp_customize->add_setting('footer_background_opacity', array( 'default' => 1, 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('footer_background_opacity', array( 'label' => __('Background Opacity', 'arcs'), 'section' => 'footer_background_section', )); } add_action('customize_register', 'customize_footer_background'); //Typography function enqueue_google_fonts() { $google_fonts = array( 'Open+Sans:100,200,300,400,500,600,700,800,900', 'Roboto:100,200,300,400,500,600,700,800,900', 'Lato:100,200,300,400,500,600,700,800,900', 'Montserrat:100,200,300,400,500,600,700,800,900', 'Inter:100,200,300,400,500,600,700,800,900', 'Roboto Condensed:100,200,300,400,500,600,700,800,900', 'Single Day:100,200,300,400,500,600,700,800,900' // Add more Google Fonts as needed ); wp_enqueue_style('google-fonts', 'https://fonts.googleapis.com/css?family=' . implode('|', $google_fonts), array(), null); } add_action('wp_enqueue_scripts', 'enqueue_google_fonts'); function customize_body_typography($wp_customize) { $wp_customize->add_section('body_typography_section', array( 'title' => __('Body Typography', ' arcs'), 'priority' => 30, )); $wp_customize->add_setting('body_font_source', array( 'default' => 'google', // 'google' or 'custom' 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('body_font_source', array( 'label' => __('Font Source', ' arcs'), 'section' => 'body_typography_section', 'type' => 'radio', 'choices' => array( 'google' => __('Google Fonts', ' arcs'), 'custom' => __('Custom Fonts', ' arcs'), ), )); $wp_customize->add_setting('body_google_font', array( 'default' => 'Open Sans, sans-serif', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('body_google_font', array( 'label' => __('Google Font', ' arcs'), 'section' => 'body_typography_section', 'type' => 'select', 'choices' => array( 'Open Sans, sans-serif' => 'Open Sans', 'Roboto, sans-serif' => 'Roboto', 'Lato, sans-serif' => 'Lato', 'Montserrat, sans-serif' => 'Montserrat', 'Inter, sans-serif'=>'Inter', 'Roboto Condensed, sans-serif'=>'Roboto Condensed', 'Single Day, cursive'=>'Single Day', ), 'active_callback' => function () use ($wp_customize) { return $wp_customize->get_setting('body_font_source')->value() === 'google'; }, )); $wp_customize->add_setting('body_custom_font', array( 'default' => 'Arial, sans-serif', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('body_custom_font', array( 'label' => __('Custom Font', ' arcs'), 'section' => 'body_typography_section', 'type' => 'text', 'active_callback' => function () use ($wp_customize) { return $wp_customize->get_setting('body_font_source')->value() === 'custom'; }, )); $wp_customize->add_setting('body_font_size', array( 'default' => '16px', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('body_font_size', array( 'label' => __('Font Size', ' arcs'), 'section' => 'body_typography_section', )); $wp_customize->add_setting('body_font_style', array( 'default' => 'normal', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('body_font_style', array( 'label' => __('Font Style', ' arcs'), 'section' => 'body_typography_section', 'type' => 'select', 'choices' => array( 'normal' => __('Normal', ' arcs'), 'italic' => __('Italic', ' arcs'), 'oblique' => __('Oblique', 'arcs'), 'unset' => __('Unset', 'arcs'), 'revert' => __('Revert', 'arcs'), 'revert-layer' => __('Revert-layer', 'arcs'), 'initial' => __('Initial', 'arcs'), 'inherit' => __('Inherit', 'arcs'), ), )); $wp_customize->add_setting('body_font_weight', array( 'default' => '400', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('body_font_weight', array( 'label' => __('Font Weight', ' arcs'), 'section' => 'body_typography_section', )); $wp_customize->add_setting('body_font_color', array( 'default' => '#000000', // Set your default color 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control('body_font_color', array( 'label' => __('Body Font Color', ' arcs'), 'section' => 'body_typography_section', 'type' => 'color', )); // Add more controls for line height, letter spacing, etc., as needed. } add_action('customize_register', 'customize_body_typography'); //Typography Heading // Step 1: Add custom typography settings in the WordPress Customizer function customize_heading_typography($wp_customize) { // Add a new section for heading typography customization $wp_customize->add_section('heading_typography_section', array( 'title' => __('Heading Typography', ' arcs'), 'priority' => 31, // Adjust the priority to ensure it appears after the body typography section )); // Define heading levels $headings = array('h1', 'h2', 'h3', 'h4', 'h5', 'h6'); // Loop through heading levels to add settings and controls foreach ($headings as $heading) { // Font Size control $wp_customize->add_setting($heading . '_font_size', array( 'default' => '32px', // Default font size for headings 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control($heading . '_font_size', array( 'label' => strtoupper($heading) . ' Font Size', 'section' => 'heading_typography_section', 'type' => 'text', )); // Font Family control $wp_customize->add_setting($heading . '_font_family', array( 'default' => 'Arial, sans-serif', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control($heading . '_font_family', array( 'label' => strtoupper($heading) . ' Font Family', 'section' => 'heading_typography_section', 'type' => 'text', )); // Google Font control $wp_customize->add_setting($heading . '_google_font', array( 'default' => 'Open Sans', // Default Google Font 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control($heading . '_google_font', array( 'label' => strtoupper($heading) . ' Google Font', 'section' => 'heading_typography_section', 'type' => 'select', 'choices' => array( 'Open Sans, sans-serif' => 'Open Sans', 'Roboto, sans-serif' => 'Roboto', 'Lato, sans-serif' => 'Lato', 'Montserrat, sans-serif' => 'Montserrat', 'Inter, sans-serif'=>'Inter', 'Roboto Condensed, sans-serif'=>'Roboto Condensed', 'Single Day, cursive'=>'Single Day', ), )); // Font Weight control $wp_customize->add_setting($heading . '_font_weight', array( 'default' => 'bold', // Default font weight for headings 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control($heading . '_font_weight', array( 'label' => strtoupper($heading) . ' Font Weight', 'section' => 'heading_typography_section', 'type' => 'text', )); // Font Color control $wp_customize->add_setting($heading . '_font_color', array( 'default' => '#000000', // Default font color for headings 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, $heading . '_font_color', array( 'label' => strtoupper($heading) . ' Font Color', 'section' => 'heading_typography_section', ))); // Font Style control (optional) $wp_customize->add_setting($heading . '_font_style', array( 'default' => 'normal', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control($heading . '_font_style', array( 'label' => strtoupper($heading) . ' Font Style', 'section' => 'heading_typography_section', 'type' => 'select', 'choices' => array( 'normal' => __('Normal', ' arcs'), 'italic' => __('Italic', ' arcs'), 'oblique' => __('Oblique', 'arcs'), 'unset' => __('Unset', 'arcs'), 'revert' => __('Revert', 'arcs'), 'revert-layer' => __('Revert-layer', 'arcs'), 'initial' => __('Initial', 'arcs'), 'inherit' => __('Inherit', 'arcs'), ), )); } } add_action('customize_register', 'customize_heading_typography'); // Step 2: Define a function to output custom CSS based on typography settings function output_custom_heading_typography_css() { echo ''; } add_action('wp_head', 'output_custom_heading_typography_css'); // Customizer Settings for 404 Page Background function customize_404_background($wp_customize) { $wp_customize->add_section('404_background_section', array( 'title' => __('404 Page Background', 'arcs'), 'priority' => 30, )); $wp_customize->add_setting('404_background_image', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, '404_background_image', array( 'label' => __('Background Image', 'arcs'), 'section' => '404_background_section', 'settings' => '404_background_image', ))); // Add more controls for other background properties as needed } add_action('customize_register', 'customize_404_background'); // Set 404 Page Background function set_404_background() { if (is_404()) { $background_image_url = get_theme_mod('404_background_image', ''); // Get background image URL // Get other background properties similarly ?> add_section('submenu_colors_section', array( 'title' => __('Submenu Colors', 'arcs'), 'priority' => 30, )); // Add setting and control for submenu background color $wp_customize->add_setting('submenu_bg_color', array( 'default' => '#ffffff', // Default background color 'sanitize_callback' => 'sanitize_hex_color', // Sanitization callback )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'submenu_bg_color_control', array( 'label' => __('Submenu Background Color', 'arcs'), 'section' => 'submenu_colors_section', 'settings' => 'submenu_bg_color', ))); // Add setting and control for submenu background hover color $wp_customize->add_setting('submenu_bg_hover_color', array( 'default' => '#e6e6e6', // Default background hover color 'sanitize_callback' => 'sanitize_hex_color', // Sanitization callback )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'submenu_bg_hover_color_control', array( 'label' => __('Submenu Background Hover Color', 'arcs'), 'section' => 'submenu_colors_section', 'settings' => 'submenu_bg_hover_color', ))); // Add setting and control for submenu text color $wp_customize->add_setting('submenu_text_color', array( 'default' => '#333333', // Default text color 'sanitize_callback' => 'sanitize_hex_color', // Sanitization callback )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'submenu_text_color_control', array( 'label' => __('Submenu Text Color', 'arcs'), 'section' => 'submenu_colors_section', 'settings' => 'submenu_text_color', ))); // Add setting and control for submenu text hover color $wp_customize->add_setting('submenu_text_hover_color', array( 'default' => '#000000', // Default text hover color 'sanitize_callback' => 'sanitize_hex_color', // Sanitization callback )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'submenu_text_hover_color_control', array( 'label' => __('Submenu Text Hover Color', 'arcs'), 'section' => 'submenu_colors_section', 'settings' => 'submenu_text_hover_color', ))); } add_action('customize_register', 'customize_submenu_colors'); // Output submenu colors CSS function output_submenu_colors_css() { $submenu_bg_color = get_theme_mod('submenu_bg_color', '#ffffff'); $submenu_bg_hover_color = get_theme_mod('submenu_bg_hover_color', '#e6e6e6'); $submenu_text_color = get_theme_mod('submenu_text_color', '#333333'); $submenu_text_hover_color = get_theme_mod('submenu_text_hover_color', '#000000'); // Output CSS echo ''; } add_action('wp_head', 'output_submenu_colors_css'); //template // Step 1: Add Submenu Page function add_template_selection_submenu_page() { add_submenu_page( 'themes.php', // Parent menu slug 'Home Page Template', // Page title 'Home Page Template', // Menu title 'manage_options', // Capability 'home-page-template', // Menu slug 'render_template_selection_page' // Callback function to render the page ); } add_action('admin_menu', 'add_template_selection_submenu_page'); // Step 2: Render Template Selection Page function render_template_selection_page() { ?>

Home Page Template Selection

'custom-style', 'label' => __('Custom Style', 'arcs'), ) ); } add_action('init', 'theme_register_block_styles'); // Register block patterns function theme_register_block_patterns() { register_block_pattern( 'custom-pattern', array( 'title' => __('Custom Pattern', 'arcs'), 'description' => __('A custom block pattern.', 'arcs'), 'content' => '', ) ); } add_action('init', 'theme_register_block_patterns'); // Add support for custom header add_theme_support('custom-header', array( 'default-image' => get_template_directory_uri() . '/images/header-image.jpg', 'width' => 1200, 'height' => 400, 'flex-width' => true, 'flex-height' => true, )); // Add editor styles add_editor_style('editor-style.css'); // Enqueue comment reply script function enqueue_comment_reply_script() { if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } } add_action('wp_enqueue_scripts', 'enqueue_comment_reply_script'); // Add support for wide alignments function theme_support_align_wide() { add_theme_support('align-wide'); } add_action('after_setup_theme', 'theme_support_align_wide');