<?php
/**
 * The template for displaying all single posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
 *
 * @package eco-solar-energy
 */

get_header();
?>

<main id="primary" class="site-main singlepage">
    <div class="banner-head">
        <div class="innerheader-overly"></div>
           <div class="header-img">
    <img src="<?php echo esc_url( get_template_directory_uri() . '/assets/images/sliderimg2.png' ); ?>" alt="">
</div>
<div class="star-headerimg1">
			<img alt="slider" class="slider-image"
				src="<?php echo esc_url(get_theme_mod('eco_solar_energy_slider_image11') ?: get_template_directory_uri() . '/assets/images/sliderstarimg.png'); ?>" />
		</div>
		<div class="star-headerimg2">
			<img alt="slider" class="slider-image"
				src="<?php echo esc_url(get_theme_mod('eco_solar_energy_slider_image11') ?: get_template_directory_uri() . '/assets/images/sliderstarimg.png'); ?>" />
		</div>
		<div class="star-headerimg3">
			<img alt="slider" class="slider-image"
				src="<?php echo esc_url(get_theme_mod('eco_solar_energy_slider_image11') ?: get_template_directory_uri() . '/assets/images/sliderstarimg.png'); ?>" />
		</div>
		<div class="star-headerimg4">
			<img alt="slider" class="slider-image"
				src="<?php echo esc_url(get_theme_mod('eco_solar_energy_slider_image11') ?: get_template_directory_uri() . '/assets/images/sliderstarimg.png'); ?>" />
		</div>
        <header class="entry-header">
            <h1 class="entry-title"><?php the_title(); ?></h1>
        </header>
    </div>
    <div class="blog-div container-fluid p-5">
        <div class="row">
            <div class="col-lg-12 col-md-12 col-12">
                <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                    <header class="entry-header pt-5">
                        <?php the_title('<h1 class="entry-title">', '</h1>'); ?>
                        <div class="archive-info">

                            <!-- // Output additional archive information, such as date, author, category, etc. -->
                            <span class="date">Published on: <?php the_time('F j, Y'); ?></span>
                            <span class="author">by <?php the_author(); ?></span>

                        </div>
                    </header>
                    <div class="row">
                        <div class="entry-content col-lg-9 col-md-9 col-12">

                            <?php
                            // Exclude the featured image from the content
                            echo get_the_content();
                            ?>
                            <!-- <div class="pt-3"></div> -->
                            <span class="categories">Categories: <?php the_category(', '); ?></span>

                            <!-- /////////// -->
                            <?php
                            if (has_post_thumbnail()) {
                                the_post_thumbnail('full'); // You can specify the image size here
                            }
                            ?>
                            <!-- //////// comment box -->
                            <div class="pt-5">
                                <?php
                                while (have_posts()):
                                    the_post();
                                    //   get_template_part( 'template-parts/content', get_post_type() );
                                    // If comments are open or we have at least one comment, load up the comment template.
                                    if (comments_open() || get_comments_number()):
                                        comments_template();
                                    endif;

                                endwhile; // End of the loop.
                                ?>
                            </div>
                        </div>
                        <div class="col-lg-3 col-md-3 col-12 single_sidebar">
                            <?php
                            // The Loop
                            if (have_posts()):
                                while (have_posts()):
                                    the_post();

                                    // Your single post content here
                            
                                endwhile;
                            endif;
                            if (is_active_sidebar('sidebar-1')) {
                                dynamic_sidebar('sidebar-1');
                            } else {
                                get_sidebar();
                            }
                            ?>
                        </div>
                    </div>
            </div>
        </div>
        <?php
        the_post_navigation(
            array(
                'prev_text' => '<span class="nav-subtitle">' . esc_html__('Previous:', 'eco-solar-energy') . '</span> <span class="">%title</span>',
                'next_text' => '<span class="nav-subtitle">' . esc_html__('Next:', 'eco-solar-energy') . '</span> <span class="">%title</span>',
            )
        );
        ?>
    </div>


    <footer class="entry-footer">
        <?php
        // Output additional meta information, tags, categories, etc.
        ?>
    </footer>
    </article><!-- #post-<?php the_ID(); ?> -->

    </div>
    </div>

</main><!-- #main -->

<?php

get_footer();