100, 'width' => 300, 'flex-height' => true, 'flex-width' => true, )); // Custom header support add_theme_support('custom-header', array( 'default-image' => '', 'width' => 1920, 'height' => 1080, 'flex-width' => true, 'flex-height' => true, )); // Custom background support add_theme_support('custom-background', array( 'default-color' => 'ffffff', )); // Editor styles add_theme_support('editor-styles'); add_editor_style('assets/css/editor-style.css'); // Block editor features add_theme_support('wp-block-styles'); add_theme_support('responsive-embeds'); add_theme_support('align-wide'); // Custom color palette for Gutenberg add_theme_support('editor-color-palette', array( array( 'name' => __('Primary Blue', 'navier-instruments'), 'slug' => 'primary', 'color' => '#0A4D8C', ), array( 'name' => __('Eco Green', 'navier-instruments'), 'slug' => 'secondary', 'color' => '#2ECC71', ), array( 'name' => __('Accent Cyan', 'navier-instruments'), 'slug' => 'accent', 'color' => '#00B4D8', ), array( 'name' => __('Dark', 'navier-instruments'), 'slug' => 'dark', 'color' => '#1A1A2E', ), array( 'name' => __('Light Gray', 'navier-instruments'), 'slug' => 'light-gray', 'color' => '#F4F4F8', ), array( 'name' => __('White', 'navier-instruments'), 'slug' => 'white', 'color' => '#FFFFFF', ), )); // Image sizes add_image_size('navier-hero', 1200, 800, true); add_image_size('navier-card', 600, 450, true); add_image_size('navier-thumbnail', 400, 300, true); add_image_size('navier-product', 800, 600, true); // Register navigation menus register_nav_menus(array( 'primary' => __('Primary Menu', 'navier-instruments'), 'footer' => __('Footer Menu', 'navier-instruments'), 'footer-2' => __('Footer Menu 2', 'navier-instruments'), 'legal' => __('Legal Menu', 'navier-instruments'), )); } add_action('after_setup_theme', 'navier_setup'); /** * Content Width */ function navier_content_width() { $GLOBALS['content_width'] = apply_filters('navier_content_width', 1200); } add_action('after_setup_theme', 'navier_content_width', 0); /** * Enqueue Scripts and Styles */ function navier_scripts() { // Google Fonts - Inter & Montserrat wp_enqueue_style( 'navier-google-fonts', 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@600;700;800&display=swap', array(), null ); // Main stylesheet wp_enqueue_style( 'navier-style', get_stylesheet_uri(), array(), NAVIER_VERSION ); // Additional CSS wp_enqueue_style( 'navier-custom', NAVIER_URI . '/assets/css/custom.css', array('navier-style'), NAVIER_VERSION ); // Main JavaScript wp_enqueue_script( 'navier-main', NAVIER_URI . '/assets/js/main.js', array(), NAVIER_VERSION, true ); // Localize script wp_localize_script('navier-main', 'navierData', array( 'ajaxUrl' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('navier_nonce'), 'homeUrl' => home_url(), )); // Comment reply script if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } } add_action('wp_enqueue_scripts', 'navier_scripts'); /** * Admin Scripts and Styles */ function navier_admin_scripts() { wp_enqueue_style( 'navier-admin', NAVIER_URI . '/assets/css/admin.css', array(), NAVIER_VERSION ); } add_action('admin_enqueue_scripts', 'navier_admin_scripts'); /** * Register Widget Areas */ function navier_widgets_init() { register_sidebar(array( 'name' => __('Sidebar', 'navier-instruments'), 'id' => 'sidebar-1', 'description' => __('Add widgets here to appear in the sidebar.', 'navier-instruments'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __('Footer Widget 1', 'navier-instruments'), 'id' => 'footer-1', 'description' => __('Add widgets here to appear in footer column 1.', 'navier-instruments'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __('Footer Widget 2', 'navier-instruments'), 'id' => 'footer-2', 'description' => __('Add widgets here to appear in footer column 2.', 'navier-instruments'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __('Footer Widget 3', 'navier-instruments'), 'id' => 'footer-3', 'description' => __('Add widgets here to appear in footer column 3.', 'navier-instruments'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } add_action('widgets_init', 'navier_widgets_init'); /** * Custom Walker for Navigation Menu */ class Navier_Nav_Walker extends Walker_Nav_Menu { public function start_lvl(&$output, $depth = 0, $args = null) { $indent = str_repeat("\t", $depth); $output .= "\n$indent