fix: Resolve header overlap and CSS loading issues on event edit page
- Fixed z-index layering with !important rules for proper navigation stacking - Enhanced CSS file loading detection with multiple page identification methods - Added comprehensive header overlap prevention for all Astra theme header elements - Improved event edit page detection to handle URL patterns and page IDs - Verified all fixes working on staging with proper navigation visibility 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f9b43588df
commit
f525f4a85d
2 changed files with 38 additions and 13 deletions
|
|
@ -34,20 +34,36 @@
|
|||
--hvac-border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Fix navigation bar z-index issue */
|
||||
.hvac-event-edit-page .hvac-trainer-menu-wrapper {
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
background: #fff;
|
||||
margin-bottom: 0;
|
||||
/* Fix navigation bar z-index issue - force above all site headers */
|
||||
.hvac-trainer-menu-wrapper {
|
||||
position: relative !important;
|
||||
z-index: 999 !important;
|
||||
background: #fff !important;
|
||||
margin-bottom: 0 !important;
|
||||
width: 100% !important;
|
||||
top: 0 !important;
|
||||
}
|
||||
|
||||
/* Ensure breadcrumbs appear correctly */
|
||||
.hvac-event-edit-page .hvac-breadcrumbs {
|
||||
position: relative;
|
||||
z-index: 90;
|
||||
background: #fff;
|
||||
padding: 15px 0;
|
||||
.hvac-breadcrumbs {
|
||||
position: relative !important;
|
||||
z-index: 998 !important;
|
||||
background: #fff !important;
|
||||
padding: 15px 0 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
/* Force site header to stay below trainer navigation */
|
||||
.hvac-event-edit-page .site-header,
|
||||
.hvac-event-edit-page .ast-main-header-wrap,
|
||||
.hvac-event-edit-page .ast-above-header-wrap,
|
||||
.hvac-event-edit-page .ast-below-header-wrap {
|
||||
z-index: 49 !important;
|
||||
}
|
||||
|
||||
/* Add top margin to content to account for fixed navigation */
|
||||
.hvac-event-edit-page .hvac-event-edit-wrapper {
|
||||
margin-top: 20px !important;
|
||||
}
|
||||
|
||||
/* Main wrapper - matches registration page */
|
||||
|
|
|
|||
|
|
@ -129,8 +129,17 @@ final class HVAC_Custom_Event_Edit {
|
|||
* Check if current page is event edit page
|
||||
*/
|
||||
private function isEditPage(): bool {
|
||||
return get_query_var('hvac_event_edit') === '1'
|
||||
|| (is_page() && get_page_template_slug() === 'templates/page-edit-event-custom.php');
|
||||
// Check for the URL pattern /trainer/event/edit/
|
||||
$is_edit_url = strpos($_SERVER['REQUEST_URI'], '/trainer/event/edit') !== false;
|
||||
|
||||
// Check for the specific page ID (6177) that handles edit events
|
||||
$is_edit_page = is_page(6177);
|
||||
|
||||
// Check query var and template slug (fallback methods)
|
||||
$has_query_var = get_query_var('hvac_event_edit') === '1';
|
||||
$has_template = is_page() && get_page_template_slug() === 'templates/page-edit-event-custom.php';
|
||||
|
||||
return $is_edit_url || $is_edit_page || $has_query_var || $has_template;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue