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

$weddi_pro_visibility = weddi_pro_gtm( 'weddi_pro_featured_grid_visibility' );

if ( ! weddi_pro_display_section( $weddi_pro_visibility ) ) {
	return;
}

$weddi_pro_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 weddi_pro_section_title( 'featured_grid' ); ?>

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

		<?php
		$weddi_pro_button_text   = weddi_pro_gtm( 'weddi_pro_featured_grid_button_text' );
		$weddi_pro_button_link   = weddi_pro_gtm( 'weddi_pro_featured_grid_button_link' );
		$weddi_pro_button_target = weddi_pro_gtm( 'weddi_pro_featured_grid_button_target' ) ? '_blank' : '_self';

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

