<?php
/**
 * Template part for displaying Service
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package Stygian
 */

$stygian_visibility = stygian_gtm( 'stygian_featured_grid_visibility' );

if ( ! stygian_display_section( $stygian_visibility ) ) {
	return;
}

$stygian_classes[] = 'featured-grid-section section page style-one';
?>
<div id="featured-grid-section" class="featured-grid-section section page style-one">
	<div class="container">
		<?php stygian_section_title( 'featured_grid' ); ?>

		<?php get_template_part( 'template-parts/featured-grid/post-type' ); ?>

		<?php
		$stygian_button_text   = stygian_gtm( 'stygian_featured_grid_button_text' );
		$stygian_button_link   = stygian_gtm( 'stygian_featured_grid_button_link' );
		$stygian_button_target = stygian_gtm( 'stygian_featured_grid_button_target' ) ? '_blank' : '_self';

		if ( $stygian_button_text ) : ?>
			<div class="more-wrapper clear-fix">
				<a href="<?php echo esc_url($stygian_button_link); ?>" class="ff-button" target="<?php echo esc_attr( $stygian_button_target ); ?>"><?php echo esc_html($stygian_button_text); ?></a>
			</div><!-- .more-wrapper -->
		<?php endif; ?>
	</div><!-- .container -->
</div><!-- .latest-posts-section -->

