<?php
/**
 * Template part for home page content
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage xrprompt
 * @since 1.0
 * @version 1.1
 */
?>
<section class="xrprompt-section" <?php if(get_field('xr_prompt_section_background', 'option')) : ?> 
	style="background-image: url(<?php the_field('xr_prompt_section_background', 'option'); ?>)" 
<?php endif; ?>>
	<div class="container">
		  	<?php $args = array (
		  			'post_type' => 'post',
		  			'posts_per_page'  => 1
		  	);

		  	$query = new WP_Query($args);

		  	if($query->have_posts()) : while($query->have_posts()) : $query->the_post();  ?>

		  		<div class="post-content">

		  				<div>
		  					<h1><?php the_title();?></h1>

			  				<?php the_content(); ?>

			  				<?php if(get_field('inspired_by')) : ?>

			  					<span><?php the_field('inspired_by');?></span>

			  				<?php endif; ?>
			  				
			  			</div>

		  		</div>

		  	<?php endwhile; endif;

		  	wp_reset_postdata();

		  	?>
	</div>      
</section>

<section class="mailchimp-section" style="background-image: url('http://192.168.1.34/xrprompt/wp-content/uploads/2020/01/footer-bg.png')">
	<div class="container">
		<?php if(get_field('mailchimp_heading', 'option')) : ?>
			<h2><?php the_field('mailchimp_heading', 'option');?></h2>
			<div class="m-form">
				<?php include(get_parent_theme_file_path('inc/mailchimp.html')); ?>
			</div>
		<?php endif; ?>
	</div>
</section>