<?php get_header(); ?>

	<main role="main">
    <?php $backgroundImg = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );?>
		<div class="header-wrap" style="background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4)), url('<?php echo $backgroundImg[0]; ?>') no-repeat top center; min-height: 380px; padding-top: 20%; background-size: cover;">
        <div class="container"><div class="row"><div class="col-lg-12 align-self-baseline">
        <h3 class="entry-title text-white"><?php the_title(); ?></h3>
        <?php
            if ( function_exists('yoast_breadcrumb') ) {
                yoast_breadcrumb( '<p id=“breadcrumbs”>','</p><p>' );
            }
        ?>
        </div></div></div>
    </div>
	    <section class="services section-bg">
            <div class="container servpages pt-5">
	        <div class="row">
	            <div class="col-lg-12 gblog">
	                <div class="single-news">
				<?php if (have_posts()): while (have_posts()) : the_post(); ?>

		<!-- article -->
		<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

			 <!-- post thumbnail -->
        			<div class="single-post-thumbnail text-center">
        			<?php if ( has_post_thumbnail()) : // Check if Thumbnail exists ?>
        				<?php the_post_thumbnail(); // Fullsize image for the single post ?>
        			<?php endif; ?>
        			</div>
        			<!-- /post thumbnail -->
			 
			<h2 class="entry-title text-center"><?php the_title(); ?></h2>
		        <p class="author date post-details text-center">Published By <strong> Afiego </strong> <span class="author-name vcard fn author" itemprop="name"></span> | <i class="bi bi-calendar3"></i> &nbsp;<?php the_time('F j, Y'); ?></p>
		        
		        <hr class="border-post"/>
				<?php the_content(); ?> 
			
			<!-- social media sharing !-->
				<div class="d-flex justify-content-center bd-highlight mb-1 text-center social-shares">
                            <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 !-->
				
			<?php edit_post_link(); // Always handy to have Edit Post Links available ?>
			

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

	<?php endwhile; ?>

	<?php else: ?>

		<!-- article -->
		<article>

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

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

	<?php endif; ?>

			
	            </div> </div>
	        </div>
	    </div>

	</main>



<?php get_footer(); ?>
