upskill-event-manager/templates/page-master-dashboard-debug.php
bengizmo a1abbf1577 fix: Resolve duplicate content and raw shortcode display on manage event page
- Strip WordPress block editor comments (<\!-- wp:shortcode -->) from content
- Prevent duplicate header rendering when using page template vs shortcode
- Add conditional header rendering based on URL path to avoid duplication
- Header now only renders for non-hierarchical URLs where template isn't used

The manage event page was showing duplicate "Create and Manage Your HVAC Training Events"
sections and raw block editor comments because both the template and the header class
were outputting content, and block editor wrapper comments weren't being stripped.

Co-Authored-By: Ben Reed <ben@tealmaker.com>
2025-07-30 10:06:49 -03:00

26 lines
No EOL
714 B
PHP

<?php
/**
* Template Name: Master Dashboard Debug
* Description: Debug template for master dashboard
*/
get_header();
global $post;
?>
<div style="background: yellow; padding: 20px; margin: 20px;">
<h2>Debug Information</h2>
<p>Page ID: <?php echo $post->ID; ?></p>
<p>Page Title: <?php echo $post->post_title; ?></p>
<p>Page Slug: <?php echo $post->post_name; ?></p>
<p>Page Parent: <?php echo $post->post_parent; ?></p>
<p>Template: <?php echo get_post_meta($post->ID, '_wp_page_template', true); ?></p>
<p>Request URI: <?php echo $_SERVER['REQUEST_URI']; ?></p>
</div>
<?php
// Render the master dashboard shortcode
echo do_shortcode('[hvac_master_dashboard]');
get_footer();