# HVAC Community Events - Customization Examples ## Customizing Status Pages ### Method 1: Edit Content Files (Simplest) Edit the HTML files directly in the plugin: **File:** `/templates/content/trainer-account-pending.html` ```html
🎉 Special offer: Complete your profile to get 10% off your first event listing!
``` ### Method 2: Theme Override (Recommended) Copy the template to your theme and customize: ```bash # Create directory in your theme mkdir -p /your-theme/hvac-community-events/content/ # Copy the content file cp /plugins/hvac-community-events/templates/content/trainer-account-pending.html \ /your-theme/hvac-community-events/content/trainer-account-pending.html # Edit the theme version ``` ### Method 3: Using Hooks Add custom content via hooks in your theme's `functions.php`: ```php // Add content after the pending page add_action('hvac_trainer_pending_after_content', function($user) { ?> [ 'title' => 'Account Suspended', 'template' => 'status/trainer-account-suspended.php', 'public' => false, 'parent' => null, 'capability' => 'read', 'content_file' => 'content/trainer-account-suspended.html' ], ``` ### Step 2: Create Content File **File:** `/templates/content/trainer-account-suspended.html` ```htmlYour account has been suspended due to violations of our terms of service.
Estimated approval time: [hvac_pending_wait_time]
``` ### Custom Gutenberg Block Register a custom block for status pages: ```javascript // In your custom JS file wp.blocks.registerBlockType('hvac/status-message', { title: 'HVAC Status Message', icon: 'info', category: 'hvac-blocks', attributes: { type: { type: 'string', default: 'info' }, message: { type: 'string', default: '' } }, edit: function(props) { return wp.element.createElement( 'div', { className: 'hvac-status-' + props.attributes.type }, props.attributes.message ); }, save: function(props) { return wp.element.createElement( 'div', { className: 'hvac-status-' + props.attributes.type }, props.attributes.message ); } }); ``` ## Conditional Content Show content based on user data: ```php // In template file ID, 'registration_date', true); $days_waiting = floor((time() - strtotime($registration_date)) / DAY_IN_SECONDS); if ($days_waiting > 2) { echo 'Your application is being prioritized for review.
'; } ?> ``` ## Email Template Customization Customize approval emails: ```php // Hook into the email sending add_filter('hvac_approval_email_content', function($content, $user) { // Add personalized content $trainer_name = get_user_meta($user->ID, 'first_name', true); $content = str_replace('{trainer_name}', $trainer_name, $content); // Add custom footer $content .= "\n\n---\nThe HVAC Training Team"; return $content; }, 10, 2); ``` ## Best Practices 1. **Always test** customizations on a staging site first 2. **Use child themes** for theme-based customizations 3. **Document changes** for future reference 4. **Keep backups** before making significant changes 5. **Follow WordPress** coding standards 6. **Use version control** for tracking changes