- Scoped all CSS rules to .hvac-event-manage-wrapper to prevent theme conflicts - Moved navigation header directly into page template to avoid duplication - Disabled duplicate header hook in HVAC_Event_Manage_Header class - Added theme override styles to enforce 1200px max-width and 20px padding - Updated CSS methodology to use consistent spacing and remove CSS variables - Added HVAC_Page_Content_Fixer class to clean escaped HTML comments - Updated documentation with CSS architecture details - Enhanced theme compatibility with higher specificity selectors The event manage page now displays correctly with: - Single navigation header (no duplicates) - Proper white background and shadows - Consistent button styling matching other pages - Clean 1200px max-width layout with 20px padding 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
60 lines
No EOL
2.2 KiB
PHP
60 lines
No EOL
2.2 KiB
PHP
<?php
|
|
/**
|
|
* Template Name: Manage Event
|
|
* Description: Template for managing events (uses The Events Calendar)
|
|
*/
|
|
|
|
get_header();
|
|
|
|
// The Events Calendar handles the event creation/editing interface
|
|
// This template ensures proper WordPress theme integration
|
|
?>
|
|
<div class="hvac-event-manage-wrapper">
|
|
<!-- Navigation Header -->
|
|
<div class="hvac-dashboard-header">
|
|
<h1 class="entry-title">Create Event</h1>
|
|
<div class="hvac-dashboard-nav">
|
|
<a href="/trainer/dashboard/" class="ast-button ast-button-secondary">Dashboard</a>
|
|
<a href="/trainer/certificate-reports/" class="ast-button ast-button-secondary">Certificate Reports</a>
|
|
<a href="/trainer/generate-certificates/" class="ast-button ast-button-secondary">Generate Certificates</a>
|
|
<button class="ast-button hvac-help-trigger">Help</button>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
// Let The Events Calendar handle the content
|
|
if (have_posts()) :
|
|
while (have_posts()) : the_post();
|
|
// Get the raw content WITHOUT any filters
|
|
global $post;
|
|
$raw_content = $post->post_content;
|
|
|
|
// Strip ALL HTML comments that might contain shortcode references
|
|
// Use multiple patterns to catch all variations
|
|
$patterns = [
|
|
'/<!--\s*wp:shortcode\s*-->/s',
|
|
'/<!--\s*\/wp:shortcode\s*-->/s',
|
|
'/<!--[^>]*wp:shortcode[^>]*-->/s',
|
|
'/<!--.*?-->/s' // Catch all remaining HTML comments
|
|
];
|
|
|
|
foreach ($patterns as $pattern) {
|
|
$raw_content = preg_replace($pattern, '', $raw_content);
|
|
}
|
|
|
|
// Clean up any extra whitespace
|
|
$raw_content = trim($raw_content);
|
|
|
|
// Process shortcodes directly without the_content filter
|
|
$processed = do_shortcode($raw_content);
|
|
|
|
// Output the processed content
|
|
echo $processed;
|
|
endwhile;
|
|
else:
|
|
// No posts found - show the shortcode directly
|
|
echo do_shortcode('[tribe_community_events]');
|
|
endif;
|
|
?>
|
|
</div>
|
|
<?php
|
|
get_footer();
|