From d0dd9fa98af8253ac7fc52f507efff77c15efdbd Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Tue, 18 Aug 2026 21:21:14 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8feature:=20Set=20up=20homepage=20hero?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- acf/group_60bfdb328901d.json | 31 ++++++- views/blocks/homepage-hero/homepage-hero.php | 97 +++++++++++--------- 2 files changed, 85 insertions(+), 43 deletions(-) diff --git a/acf/group_60bfdb328901d.json b/acf/group_60bfdb328901d.json index 815a701..b19a227 100755 --- a/acf/group_60bfdb328901d.json +++ b/acf/group_60bfdb328901d.json @@ -2,6 +2,32 @@ "key": "group_60bfdb328901d", "title": "Homepage Hero", "fields": [ + { + "key": "field_6a84d6008c2b1", + "label": "Hero Image", + "name": "hero_image", + "aria-label": "", + "type": "image", + "instructions": "", + "required": 0, + "conditional_logic": 0, + "wrapper": { + "width": "", + "class": "", + "id": "" + }, + "return_format": "array", + "library": "all", + "min_width": "", + "min_height": "", + "min_size": "", + "max_width": "", + "max_height": "", + "max_size": "", + "mime_types": "", + "allow_in_bindings": 0, + "preview_size": "medium" + }, { "key": "field_60bfdb328cfae", "label": "Heading", @@ -102,5 +128,8 @@ "active": true, "description": "", "show_in_rest": 0, - "modified": 1742332828 + "display_title": "", + "allow_ai_access": false, + "ai_description": "", + "modified": 1787090455 } diff --git a/views/blocks/homepage-hero/homepage-hero.php b/views/blocks/homepage-hero/homepage-hero.php index e818bec..6e1d60d 100644 --- a/views/blocks/homepage-hero/homepage-hero.php +++ b/views/blocks/homepage-hero/homepage-hero.php @@ -8,6 +8,7 @@ namespace KsPortfolio; // Retrieve ACF fields +$imgHero = get_field( 'hero_image' ); $heading = get_field( 'heading' ); $intro = get_field( 'intro' ); $ctas = get_field( 'calls_to_action' ); @@ -17,50 +18,62 @@ $wrapper = blockWrapperAttributes( $classes, $is_preview ); ?>
> -
-
- -

- -

- +
+
+ +

+ +

+ - -
- -
- + +
+ +
+ - -
- $cta ) : ?> - +
+ $cta ) : ?> + - - color="primary" - - color="primary" variant="outline" - - width="small" - > - -
- -
+ // Handle admin preview + if ( is_admin() && $ctaURL ) { + $ctaURL = '#'; + } + ?> + + color="primary" + + color="primary" variant="outline" + + width="small" + > + +
+ +
+ +
+ +
+ <?php echo esc_attr( $imgHero['alt'] ); ?> +
+ +