upskill-event-manager/scripts/add-child-theme-css.sh
bengizmo b55b169750 Create Astra child theme and fix page layouts
- Created astra-child-hvac child theme with all HVAC page templates
- Applied Astra-specific layout settings to remove sidebars
- Set all HVAC pages to 'no-sidebar' layout using Astra meta
- Added custom CSS to child theme for full-width layouts
- Templates now properly render shortcode content without sidebars

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 07:30:05 -03:00

71 lines
No EOL
2 KiB
Bash
Executable file

#!/bin/bash
echo "=== Adding CSS to Child Theme ==="
# SSH into staging and add CSS
ssh roodev@146.190.76.204 << 'EOF'
cd /home/974670.cloudwaysapps.com/uberrxmprk/public_html
# Add custom CSS to child theme style.css
cat >> "wp-content/themes/astra-child-hvac/style.css" << 'CSS'
/* HVAC Community Events - Hide sidebars and ensure full width */
body.page-template-page-trainer-registration .sidebar,
body.page-template-page-trainer-registration #secondary,
body.page-template-page-trainer-registration .widget-area,
body.page-template-page-trainer-dashboard .sidebar,
body.page-template-page-trainer-dashboard #secondary,
body.page-template-page-trainer-dashboard .widget-area,
body.page-template-page-master-dashboard .sidebar,
body.page-template-page-master-dashboard #secondary,
body.page-template-page-master-dashboard .widget-area,
body[class*="page-template-page-"] .sidebar,
body[class*="page-template-page-"] #secondary,
body[class*="page-template-page-"] .widget-area {
display: none !important;
}
/* Full width content for HVAC pages */
body[class*="page-template-page-"] #primary,
body[class*="page-template-page-"] .content-area,
body[class*="page-template-page-"] .site-main {
width: 100% !important;
max-width: 100% !important;
margin: 0 auto;
}
/* Remove default container constraints */
body[class*="page-template-page-"] .ast-container {
max-width: 100% !important;
padding: 0;
}
/* HVAC page wrapper styles */
.hvac-page-wrapper {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 40px 20px;
}
/* Hide page titles on HVAC pages */
body[class*="page-template-page-"] .entry-title {
display: none !important;
}
/* Ensure proper layout for HVAC content */
body[class*="page-template-page-"] .site-content {
padding: 0;
}
body[class*="page-template-page-"] .site-content .ast-container {
display: block;
}
CSS
# Clear all caches
wp cache flush
wp breeze purge --all
echo "CSS added to child theme successfully!"
EOF