- Fix the Trainer Login page to directly use Login_Handler class - Skip shortcode processing and call render_login_form directly - Ensure Login_Handler class is loaded before rendering the form The issue was that the shortcode registration mechanism wasn't working properly between the namespace and the static/non-static method calls. By directly instantiating the Login_Handler class and calling the render method, we bypass the shortcode system and directly render the login form. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
34 lines
No EOL
1.2 KiB
PHP
34 lines
No EOL
1.2 KiB
PHP
<?php
|
|
/**
|
|
* Template Name: HVAC Community Login
|
|
*
|
|
* This is the custom template for the community login page.
|
|
*
|
|
* @package HVAC_Community_Events
|
|
*/
|
|
|
|
get_header(); ?>
|
|
|
|
<div id="primary" class="content-area">
|
|
<main id="main" class="site-main" role="main">
|
|
<div class="hvac-community-login-container">
|
|
<h1 class="entry-title">
|
|
<?php esc_html_e('Trainer Login', 'hvac-ce'); ?>
|
|
</h1>
|
|
<div class="entry-content">
|
|
<?php
|
|
// Process the shortcode directly
|
|
// First instantiate the login handler class to ensure shortcode is registered
|
|
if (!class_exists('\\HVAC_Community_Events\\Community\\Login_Handler')) {
|
|
require_once HVAC_CE_PLUGIN_DIR . 'includes/community/class-login-handler.php';
|
|
}
|
|
$login_handler = new \HVAC_Community_Events\Community\Login_Handler();
|
|
// Now call the render method directly
|
|
echo $login_handler->render_login_form(array());
|
|
?>
|
|
</div>
|
|
</div>
|
|
</main><!-- #main -->
|
|
</div><!-- #primary -->
|
|
|
|
<?php get_footer(); ?>
|