endurain
2/2/2020 - 4:28 PM

WordPress Posts Page

<?php
/*
Template Name: Home
*/
get_header("booking-button"); ?>
<h1 style="text-align:center;padding-top:30px;">Cathedral Plumbing Tips, Tricks & How-Tos</h1>

	<?php if ( have_posts() ) : ?>

		<?php
		// Start the loop.
		while ( have_posts() ) : the_post();

?>




			<article style="margin:25px 0;" id="post-<?php the_ID(); ?>" <?php post_class("page-article page-article-full"); ?>>

				<header class="entry-header">
					<?php
						if ( is_single() ) :
							the_title( '<h2 class="entry-title">', '</h2>' );
						else :
							the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
						endif;
					?>
				</header><!-- .entry-header -->

				<div class="entry-content">
					<?php
						the_excerpt( __( 'Continue reading ...', 'cathedralplumbingtx' ));
					?>
				</div><!-- .entry-content -->

				<?php if ( has_post_thumbnail() ): {
				    $src = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
				}?>

				<div class="featured-image-full-width" style="background-image: url( <?php echo $src; ?> ) !important; height: 250px; background-size: cover; background-repeat: no-repeat; background-position: center;"></div>

				<?php endif; ?>

				<footer class="entry-footer">
					<?php edit_post_link( __( 'Edit', 'cathedralplumbingtx' ), '<span class="edit-link">', '</span>' ); ?>
				</footer><!-- .entry-footer -->


			</article><!-- #post-## -->
<hr />
			<?php
			// if ( is_single() ) :
			// 	// 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;
			// endif;


		// End the loop.
		endwhile;

		// Previous/next page navigation.
		the_posts_pagination( array(
			'prev_text'          => __( 'Prev page', 'cathedralplumbingtx' ),
			'next_text'          => __( 'Next page', 'cathedralplumbingtx' ),
		) );

	// If no content, include the "No posts found" template.
	else :
		get_template_part( 'content', 'none' );

	endif;
	?>


	<?php
	get_template_part('inc/part', 'tpl-footer');
	if( function_exists("c_get_page_footer") ){
		c_get_page_footer(array(
			"title" => "Schedule your free inspection today",
		));
	}
	?>

<?php get_footer(); ?>