diff --git a/includes/SiteGen/SiteGen.php b/includes/SiteGen/SiteGen.php index 9780d9a..7f95b4e 100644 --- a/includes/SiteGen/SiteGen.php +++ b/includes/SiteGen/SiteGen.php @@ -440,8 +440,9 @@ public static function get_home_pages( $site_description, $content_style, $targe $categories_to_separate = array( 'header', 'footer' ); // Choose random categories for the generated patterns and return foreach ( $random_homepages as $homepage_index => $slug ) { - $generated_homepages[ $slug ] = array(); - $homepage_patterns = array(); + $generated_homepages[ $slug ] = array(); + $homepage_patterns = array(); + $homepage_patterns['generatedImages'] = array(); foreach ( $generated_content_structures[ $slug ] as $pattern_category ) { if ( empty( $generated_patterns[ $pattern_category ] ) ) { continue; @@ -457,8 +458,6 @@ public static function get_home_pages( $site_description, $content_style, $targe $homepage_patterns['content'] = $homepage_patterns['content'] . $random_pattern['replacedPattern']; } - $homepage_patterns['generatedImages'] = array(); - if ( ! empty( $random_pattern['dalleImages'] ) ) { $homepage_patterns['generatedImages'] = $random_pattern['dalleImages']; }