<?php
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Templates use local variables supplied by the render context.
if (!defined('ABSPATH')) {
    exit;
}

$nexdirectory_is_block_theme = function_exists('wp_is_block_theme') && wp_is_block_theme();

if ($nexdirectory_is_block_theme) {
    ?><!doctype html>
<html <?php language_attributes(); ?>>
<head>
    <meta charset="<?php bloginfo('charset'); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php
wp_body_open();
} else {
    get_header();
}
?>
<main id="nexdirectory-single-main" class="nexdirectory-single-template-wrap">
    <?php while (have_posts()) : the_post(); ?>
        <?php the_content(); ?>
    <?php endwhile; ?>
</main>
<?php
if ($nexdirectory_is_block_theme) {
    wp_footer();
    ?>
</body>
</html>
    <?php
} else {
    get_footer();
}
