#!/bin/bash echo "=== Creating Astra Child Theme for HVAC Community Events ===" # SSH into staging and create child theme ssh roodev@146.190.76.204 << 'EOF' cd /home/974670.cloudwaysapps.com/uberrxmprk/public_html # Create child theme directory CHILD_THEME_DIR="wp-content/themes/astra-child-hvac" echo "Creating child theme directory: $CHILD_THEME_DIR" mkdir -p "$CHILD_THEME_DIR" # Create style.css for child theme cat > "$CHILD_THEME_DIR/style.css" << 'STYLE' /* Theme Name: Astra Child - HVAC Community Events Theme URI: https://upskill.measurequick.com Author: Ben Reed Author URI: https://tealmaker.com Description: Child theme for Astra to support HVAC Community Events plugin templates Template: astra Version: 1.0.0 License: GPL v2 or later Text Domain: astra-child-hvac */ /* Import parent theme styles */ @import url("../astra/style.css"); /* Custom styles for HVAC Community Events can be added below */ STYLE # Create functions.php for child theme cat > "$CHILD_THEME_DIR/functions.php" << 'PHP' 'Trainer Dashboard', 'page-trainer-registration.php' => 'Trainer Registration', 'page-master-dashboard.php' => 'Master Dashboard', 'page-trainer-login.php' => 'Trainer Login', 'page-trainer-profile.php' => 'Trainer Profile', 'page-manage-event.php' => 'Manage Event', 'page-event-summary.php' => 'Event Summary', 'page-certificate-reports.php' => 'Certificate Reports', 'page-generate-certificates.php' => 'Generate Certificates', 'page-email-attendees.php' => 'Email Attendees', 'page-communication-templates.php' => 'Communication Templates', 'page-communication-schedules.php' => 'Communication Schedules', 'page-documentation.php' => 'Documentation', 'page-attendee-profile.php' => 'Attendee Profile', 'page-google-sheets.php' => 'Google Sheets', 'page-certificate-fix.php' => 'Certificate Fix', 'page-trainer-account-pending.php' => 'Account Pending', 'page-trainer-account-disabled.php' => 'Account Disabled', 'page-registration-pending.php' => 'Registration Pending', ); return array_merge( $templates, $hvac_templates ); }, 10, 1 ); PHP # Create screenshot placeholder echo "Creating screenshot placeholder..." cat > "$CHILD_THEME_DIR/screenshot.png" << 'SCREENSHOT' # This is a placeholder - replace with actual screenshot SCREENSHOT # Activate the child theme echo "Activating child theme..." wp theme activate astra-child-hvac # Create directory for HVAC templates mkdir -p "$CHILD_THEME_DIR/hvac-community-events" # Copy templates from plugin to child theme PLUGIN_DIR="wp-content/plugins/hvac-community-events" if [ -d "$PLUGIN_DIR/templates" ]; then echo "Copying page templates to child theme..." find "$PLUGIN_DIR/templates" -name "page-*.php" -exec cp {} "$CHILD_THEME_DIR/" \; echo "Templates copied:" ls -la "$CHILD_THEME_DIR"/page-*.php fi # Clear cache wp cache flush echo "Child theme created and activated successfully!" # Show theme info wp theme get astra-child-hvac --fields=name,status,version EOF