fix: Force custom event edit template loading using page ID
- Added page ID 6177 detection for reliability - Using multiple detection methods (page ID, slug, URL) - Works around WordPress limitation of not loading plugin templates via page template assignment
This commit is contained in:
parent
0b854a8c5b
commit
0e2bb0c139
1 changed files with 2 additions and 1 deletions
|
|
@ -863,7 +863,8 @@ class HVAC_Community_Events {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for new custom edit event page (hierarchical URL)
|
// Check for new custom edit event page (hierarchical URL)
|
||||||
if (is_page() && strpos($_SERVER['REQUEST_URI'], '/trainer/event/edit') !== false) {
|
// Using multiple detection methods for reliability
|
||||||
|
if (is_page(6177) || is_page('trainer/event/edit') || (is_page() && strpos($_SERVER['REQUEST_URI'], '/trainer/event/edit') !== false)) {
|
||||||
$custom_template = HVAC_PLUGIN_DIR . 'templates/page-edit-event-custom.php';
|
$custom_template = HVAC_PLUGIN_DIR . 'templates/page-edit-event-custom.php';
|
||||||
HVAC_Logger::info("Loading custom edit-event template", 'Template Loader');
|
HVAC_Logger::info("Loading custom edit-event template", 'Template Loader');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue