From 7b1b91eb66cfc2be188760625843b530ce69901f Mon Sep 17 00:00:00 2001 From: "Hanson.xyz Dev" Date: Fri, 28 Nov 2025 15:58:18 -0600 Subject: [PATCH] Step 1.1: Theme directory structure with base files --- wp-content/themes/homeproz/functions.php | 30 ++ wp-content/themes/homeproz/inc/enqueue.php | 85 ++++++ .../homeproz/inc/template-functions.php | 154 ++++++++++ .../themes/homeproz/inc/theme-setup.php | 114 ++++++++ wp-content/themes/homeproz/index.php | 40 +++ wp-content/themes/homeproz/src/main.js | 17 ++ wp-content/themes/homeproz/src/main.scss | 268 ++++++++++++++++++ wp-content/themes/homeproz/src/tailwind.css | 3 + wp-content/themes/homeproz/style.css | 18 ++ 9 files changed, 729 insertions(+) create mode 100644 wp-content/themes/homeproz/functions.php create mode 100644 wp-content/themes/homeproz/inc/enqueue.php create mode 100644 wp-content/themes/homeproz/inc/template-functions.php create mode 100644 wp-content/themes/homeproz/inc/theme-setup.php create mode 100644 wp-content/themes/homeproz/index.php create mode 100644 wp-content/themes/homeproz/src/main.js create mode 100644 wp-content/themes/homeproz/src/main.scss create mode 100644 wp-content/themes/homeproz/src/tailwind.css create mode 100644 wp-content/themes/homeproz/style.css diff --git a/wp-content/themes/homeproz/functions.php b/wp-content/themes/homeproz/functions.php new file mode 100644 index 00000000..b192f5fb --- /dev/null +++ b/wp-content/themes/homeproz/functions.php @@ -0,0 +1,30 @@ + admin_url('admin-ajax.php'), + 'nonce' => wp_create_nonce('homeproz_nonce'), + 'siteurl' => get_site_url(), + )); + } + + // Google Fonts - Abril Fatface and Inter + wp_enqueue_style( + 'homeproz-fonts', + 'https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Inter:wght@400;500;600;700&display=swap', + array(), + null + ); +} +add_action('wp_enqueue_scripts', 'homeproz_scripts'); + +/** + * Enqueue editor styles + */ +function homeproz_editor_styles() { + add_editor_style('dist/assets/editor.css'); + + // Google Fonts for editor + add_editor_style('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Inter:wght@400;500;600;700&display=swap'); +} +add_action('after_setup_theme', 'homeproz_editor_styles'); + +/** + * Add preconnect for Google Fonts + */ +function homeproz_resource_hints($urls, $relation_type) { + if ($relation_type === 'preconnect') { + $urls[] = array( + 'href' => 'https://fonts.googleapis.com', + 'crossorigin' => 'anonymous', + ); + $urls[] = array( + 'href' => 'https://fonts.gstatic.com', + 'crossorigin' => 'anonymous', + ); + } + return $urls; +} +add_filter('wp_resource_hints', 'homeproz_resource_hints', 10, 2); diff --git a/wp-content/themes/homeproz/inc/template-functions.php b/wp-content/themes/homeproz/inc/template-functions.php new file mode 100644 index 00000000..f1da2df7 --- /dev/null +++ b/wp-content/themes/homeproz/inc/template-functions.php @@ -0,0 +1,154 @@ + '507-516-4870', + 'email' => 'info@homeprozrealestate.com', + 'address' => '111 E Clark St, Albert Lea, MN 56007', + 'facebook' => 'https://www.facebook.com/profile.php?id=61578834743321', + 'tiktok' => 'https://www.tiktok.com/@homeproz.real.est', + ); + + return isset($options[$key]) ? $options[$key] : $default; +} diff --git a/wp-content/themes/homeproz/inc/theme-setup.php b/wp-content/themes/homeproz/inc/theme-setup.php new file mode 100644 index 00000000..7c3d81f6 --- /dev/null +++ b/wp-content/themes/homeproz/inc/theme-setup.php @@ -0,0 +1,114 @@ + esc_html__('Primary Menu', 'homeproz'), + 'footer' => esc_html__('Footer Menu', 'homeproz'), + )); + + // Switch default core markup to output valid HTML5 + add_theme_support('html5', array( + 'search-form', + 'comment-form', + 'comment-list', + 'gallery', + 'caption', + 'style', + 'script', + )); + + // Add support for block styles + add_theme_support('wp-block-styles'); + + // Add support for responsive embeds + add_theme_support('responsive-embeds'); + + // Add support for editor styles + add_theme_support('editor-styles'); + + // Add support for custom logo + add_theme_support('custom-logo', array( + 'height' => 100, + 'width' => 300, + 'flex-height' => true, + 'flex-width' => true, + )); + + // Disable core block patterns (we'll add our own) + remove_theme_support('core-block-patterns'); +} +add_action('after_setup_theme', 'homeproz_setup'); + +/** + * Register widget areas + */ +function homeproz_widgets_init() { + register_sidebar(array( + 'name' => esc_html__('Blog Sidebar', 'homeproz'), + 'id' => 'sidebar-blog', + 'description' => esc_html__('Widgets for the blog sidebar.', 'homeproz'), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + )); + + register_sidebar(array( + 'name' => esc_html__('Footer Column 1', 'homeproz'), + 'id' => 'footer-1', + 'description' => esc_html__('First footer widget area.', 'homeproz'), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + )); + + register_sidebar(array( + 'name' => esc_html__('Footer Column 2', 'homeproz'), + 'id' => 'footer-2', + 'description' => esc_html__('Second footer widget area.', 'homeproz'), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + )); + + register_sidebar(array( + 'name' => esc_html__('Footer Column 3', 'homeproz'), + 'id' => 'footer-3', + 'description' => esc_html__('Third footer widget area.', 'homeproz'), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + )); +} +add_action('widgets_init', 'homeproz_widgets_init'); diff --git a/wp-content/themes/homeproz/index.php b/wp-content/themes/homeproz/index.php new file mode 100644 index 00000000..4ba9642f --- /dev/null +++ b/wp-content/themes/homeproz/index.php @@ -0,0 +1,40 @@ + + +
+ +
> +
+ ', ''); ?> +
+ +
+ +
+
+ +

+ +
+ +