render_trainer_menu();
    }
    ?>
    
    render_breadcrumbs();
    }
    ?>
    
        You must be logged in to view this page.';
            get_footer();
            return;
        }
        if (!current_user_can('hvac_trainer') && !current_user_can('hvac_master_trainer') && !current_user_can('administrator')) {
            echo '
You must be a trainer to view this page.
';
            get_footer();
            return;
        }
        $user_id = get_current_user_id();
        // Get trainer profile using new system
        $profile_manager = HVAC_Trainer_Profile_Manager::get_instance();
        $profile = $profile_manager->get_trainer_profile($user_id);
        if (!$profile) {
            echo '
No trainer profile found. Please contact an administrator.
';
            get_footer();
            return;
        }
        // Get profile metadata
        $profile_meta = $profile_manager->get_profile_meta($profile->ID);
        $user = get_userdata($user_id);
        // Get coordinates if available
        $geocoding_service = HVAC_Geocoding_Service::get_instance();
        $coordinates = $geocoding_service->get_coordinates($profile->ID);
        ?>
        
        
            
            
            
                
                
                
                    
                    
                        Certification Information
                        
                            
                            
                                Certification Status:
                                
                                    
                                
                            
                            
                            
                            
                                Certification Type:
                                
                            
                            
                            
                            
                                Date Certified:
                                
                            
                            
                         
                     
                    
                    
                    
                        Personal Information
                        
                            
                                Display Name:
                                display_name); ?>
                            
                            
                                Full Name:
                                first_name) . ' ' . ($profile_meta['trainer_last_name'] ?? $user->last_name)); ?>
                            
                            
                                Email:
                                user_email); ?>
                            
                            
                            
                                Role:
                                
                            
                            
                            
                            
                                Years Experience:
                                 years
                            
                            
                            
                            
                                Location:
                                
                            
                            
                            
                            
                            
                         
                     
                    
                    post_content)): ?>
                    
                    
                    
                    ID, 'business_type');
                    $has_business_info = ($business_terms && !is_wp_error($business_terms)) || 
                                       !empty($profile_meta['annual_revenue_target']) ||
                                       !empty($profile_meta['application_details']);
                    if ($has_business_info):
                    ?>
                    
                        Business Information
                        
                            
                            
                                Business Type:
                                name); ?>
                            
                            
                            
                            
                                Annual Revenue Target:
                                $
                            
                            
                            
                            
                                Application Details:
                                
                            
                            
                         
                     
                    
                    
                    
                    
                        Training Information
                        
                            
                            
                                Training Audience:
                                
                            
                            
                            
                            
                                Training Formats:
                                
                            
                            
                            
                            
                                Training Locations:
                                
                            
                            
                            
                            
                                Training Resources:
                                
                            
                            
                            
                            
                                Personal Accreditation: