'; // Ensure user is logged in and has access to the dashboard if ( ! is_user_logged_in() ) { // Redirect to login page if not logged in wp_safe_redirect( home_url( '/community-login/' ) ); exit; } // Check if user has permission to view dashboard // Allow administrators and users with view_hvac_dashboard capability if ( ! current_user_can( 'view_hvac_dashboard' ) && ! current_user_can( 'manage_options' ) ) { // Show access denied message instead of redirect to prevent loops get_header(); ?>

get_total_events_count(); $upcoming_events = $dashboard_data->get_upcoming_events_count(); $past_events = $dashboard_data->get_past_events_count(); $total_sold = $dashboard_data->get_total_tickets_sold(); $total_revenue = $dashboard_data->get_total_revenue(); $revenue_target = $dashboard_data->get_annual_revenue_target(); // --- Template Start --- get_header(); // Use theme's header ?>

Trainer Dashboard

Create Event', 'Create a new training event with custom pricing and registration options' ); ?> Generate Certificates', 'Create professional certificates for attendees who completed your training' ); ?> Certificate Reports', 'View and manage all certificates you\'ve issued to attendees' ); ?> View Profile', 'Update your professional credentials, business information, and training specialties' ); ?> Master Dashboard', 'Access the Master Trainer Dashboard to view system-wide analytics and manage all trainers' ); ?> Help Logout
Your Stats', 'Overview of your event performance and revenue metrics', 'bottom' ); ?>
Total Events', 'All events you\'ve created, including drafts and published events' ); ?>

Upcoming Events', 'Published events scheduled for future dates' ); ?>

Past Events', 'Completed events where you can generate certificates' ); ?>

Tickets Sold', 'Total number of tickets sold across all your events' ); ?>

Total Revenue', 'Total earnings from all ticket sales (before Stripe fees)' ); ?>

$

Target: $
Your Events', 'Detailed view of all your events with performance metrics and management options', 'bottom' ); ?>
per page
Filter: ', 'Filter events by their publication status' ); ?>
$current_filter, 'search' => isset($_GET['search']) ? sanitize_text_field($_GET['search']) : '', 'orderby' => isset($_GET['orderby']) ? sanitize_key($_GET['orderby']) : 'date', 'order' => isset($_GET['order']) ? sanitize_key($_GET['order']) : 'DESC', 'page' => isset($_GET['paged']) ? absint($_GET['paged']) : 1, 'per_page' => isset($_GET['per_page']) ? absint($_GET['per_page']) : 10, 'date_from' => isset($_GET['date_from']) ? sanitize_text_field($_GET['date_from']) : '', 'date_to' => isset($_GET['date_to']) ? sanitize_text_field($_GET['date_to']) : '' ); $result = $dashboard_data->get_events_table_data( $args ); $events = $result['events']; $pagination = $result['pagination']; ?>
Status Event Name Date Organizer Capacity Sold Revenue Actions
$ Edit | Summary | View
No events found.