diff --git a/blocks/content-page-header/build/render.php b/blocks/content-page-header/build/render.php index 9a84089..2c995e9 100644 --- a/blocks/content-page-header/build/render.php +++ b/blocks/content-page-header/build/render.php @@ -9,7 +9,7 @@ $customImageUrl = $attributes['imageUrl'] ?? null; $customImageAlt = $attributes['imageAlt'] ?? null; $customTitle = $attributes['blockCustomTitle'] ?? null; -$anchor = esc_html($attributes['anchor']) +$anchor = isset($attributes['anchor']) ? esc_html($attributes['anchor']) : null; ?> diff --git a/blocks/content-page-header/src/render.php b/blocks/content-page-header/src/render.php index 9a84089..2c995e9 100644 --- a/blocks/content-page-header/src/render.php +++ b/blocks/content-page-header/src/render.php @@ -9,7 +9,7 @@ $customImageUrl = $attributes['imageUrl'] ?? null; $customImageAlt = $attributes['imageAlt'] ?? null; $customTitle = $attributes['blockCustomTitle'] ?? null; -$anchor = esc_html($attributes['anchor']) +$anchor = isset($attributes['anchor']) ? esc_html($attributes['anchor']) : null; ?>