diff --git a/includes/class-hvac-community-events.php b/includes/class-hvac-community-events.php
index 4c31eb10..2d45e6d1 100644
--- a/includes/class-hvac-community-events.php
+++ b/includes/class-hvac-community-events.php
@@ -151,8 +151,6 @@ class HVAC_Community_Events {
// Template loading for custom pages
add_filter('template_include', array($this, 'load_custom_templates'), 999);
- // Force correct content on master dashboard
- add_filter('the_content', array($this, 'force_master_dashboard_content'), 1);
// Force content on edit event page
add_filter('the_content', array($this, 'force_edit_event_content'), 1);
@@ -921,9 +919,9 @@ class HVAC_Community_Events {
HVAC_Logger::error("Template validation failed in load_custom_templates: {$validation}", 'Core');
// Display error or fallback template
- add_action('wp_head', function() use ($validation) {
- echo '
There was a problem loading this page. ' .
- 'The administrator has been notified. Please try again later.
';
+ add_action('wp_footer', function() use ($validation) {
+ echo '' .
+ esc_html('There was a problem loading this page. The administrator has been notified. Please try again later.') . '
';
});
// Either fall back to the standard WP template or use a simple error template
@@ -939,18 +937,6 @@ class HVAC_Community_Events {
return $template;
} // End load_custom_templates
- /**
- * Force master dashboard content on master dashboard page
- */
- public function force_master_dashboard_content($content) {
- // Only on master dashboard page
- if (is_page('master-trainer/master-dashboard') && in_the_loop() && is_main_query()) {
- // Return the master dashboard content
- return $this->render_master_dashboard();
- }
-
- return $content;
- }
/**
* Force edit event content on edit event page
diff --git a/includes/class-hvac-master-menu-system.php b/includes/class-hvac-master-menu-system.php
index 05fdb1a2..2b9912b3 100644
--- a/includes/class-hvac-master-menu-system.php
+++ b/includes/class-hvac-master-menu-system.php
@@ -82,17 +82,17 @@ class HVAC_Master_Menu_System {
$menu_items = $this->get_master_menu_structure();
- echo '