<?php /* Template Name: Single News Article Template */ get_header(); 
    include get_template_directory() . '/inc/menus/menu1.php'; 
?>
	<main role="main">
	    <section class="page-header shadow-sm">
	        <div class="container">
	            <div class="row">
	                <div class="col-md-7 col-sm-7" data-aos="fade-up">
	                    <h1 class="entry-title"><?php the_title(); ?></h1>
	                </div><!-- Title -->
	                <div class="col-md-5 col-sm-5 align-self-center d-md-block d-none">
	                    <?php custom_breadcrumb(); ?>
	                </div><!-- breadcrumb !-->
	            </div><!-- row !-->
	        </div><!-- container !-->
	    </section><!-- Header Section !-->
		<section>
		    <div class="container page-content2">
		        <div class="row">
		            <div class="col-lg-9 col-md-9 col-sm-9" data-aos="fade up"><div class="post-content">
		        <?php if (have_posts()): while (have_posts()) : the_post(); ?>
			<!-- article -->
			<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		            <!-- post thumbnail -->
        			<div class="post-thumbnail">
        			<?php if ( has_post_thumbnail()) : // Check if Thumbnail exists ?>
        				<?php the_post_thumbnail(); // Fullsize image for the single post ?>
        			<?php endif; ?>
        			</div>
        			<!-- /post thumbnail -->
                <h1 class="entry-title"><?php the_title(); ?></h1>
		        <p class="author date post-details">Published By <strong> UNNGOF </strong> <span class="author-name vcard fn author" itemprop="name"></span> <a href="https://twitter.com/ngoforum"class="twitter-but" target="_blank"><i class="bi bi-twitter-x"></i></a></span>
			<span class="author-email"><a href="mailto:<?php the_author_meta('email'); ?>"><i class="bi bi-envelope-check"></i></a></span>
			| <i class="bi bi-calendar3"></i> &nbsp;<?php the_time('F j, Y'); ?></p>
				<?php the_content(); ?>
				
				<!-- social media sharing !-->
				<div class="d-flex justify-content-center bd-highlight mb-1">
                            <div class="bd-highlight p-1">
                                <small class="text-muted">share this article</small>
                            </div>
                            <div class="bd-highlight p-1">
                                <a class="btn btn-sm btn-facebook" href="https://www.facebook.com/sharer/sharer.php?u=<?= esc_url(get_permalink()); ?>" target="_blank" rel="noopener noreferrer" title="Facebook">
                                <small>Share on <i class="bi bi-facebook"></i> </small>
                                </a>
                            </div><!-- Facebook !-->
                            <div class="bd-highlight p-1">
                                <a class="btn btn-sm btn-twitter" href="https://twitter.com/intent/tweet?url=<?= esc_url(get_permalink()); ?>&text=<?= the_title(); ?>" target="_blank" rel="noopener noreferrer" title="Twitter">
                                <small> Share on <i class="bi bi-twitter-x"></i></small>
                                </a>
                            </div><!-- Twitter !-->
                            <div class="bd-highlight p-1">
                                <a class="btn btn-sm btn-whatsapp" href="whatsapp://send?text=Check out this product: <?= the_title(); ?> - <?= esc_url(get_permalink());?>" data-action="share/whatsapp/share" title="WhatsApp">
                                <small><i class="bi bi-whatsapp"></i> WhatsApp</small>
                                </a>
                            </div><!-- WhatsApp !-->
                        </div><!-- social sharing !-->
				<!-- End of Social Media sharing !-->
		        </div>
		        </div>
		        <div class="col-lg-3 col-md-3 col-sm-3">
		            <div class="about-side">
		                <h3>Latest Stories</h3>
		                <?php
                        include get_template_directory() . '/inc/related-news.php';
                        ?>

		            </div>
		        </div>
		        </div>
				<?php edit_post_link(); ?>

			</article>
			<!-- /article -->

		<?php endwhile; ?>

		<?php else: ?>

			<!-- article -->
			<article>

				<h2><?php _e( 'Sorry, nothing to display.', 'kipya' ); ?></h2>

			</article>
			<!-- /article -->

		<?php endif; ?>
		    </div>
		</section>
		<section class="newsletter">
		    <div class="container">
		        <div class="row newsletter-form">
		            <div class="col text-center">
		                <h2>STAY UPDATED</h2>
		                <p class="newsletter-desc">Signup for our newsletter to stay updated on the latest news and events.</p>
		                <form method="POST" action="#">
		                    <div class="row g-2"style="width:55%;margin:0 auto">
		                        <div class="col-sm-5">
		                            <input type="text" class="form-control" name="name" placeholder="First Name & Last Name"/>
		                        </div>
		                        <div class="col-sm-5">
		                            <input type="email" class="form-control" name="email" placeholder="Email Address" required/>
		                        </div>
		                        <div class="col-sm-2">
		                            <button type="submit" class="btn btn-info">Submit</button>
		                        </div>
		                    </div>
		                </form>
		            </div>
		        </div><!-- Row !-->
		    </div><!-- container !-->
		</section><!-- Newsletter !-->
		
		<!-- /section -->
 </main>


<?php get_footer(); ?>