<?php
/**
 * Template part for displaying front page imtroduction.
 *
 * @package Return Blog
 */

// Get the content type.
$cta = get_theme_mod( 'return_blog_cta', 'disable' );

if ( 'disable' === $cta ) {
    return;
}

$get_content = return_blog_get_section_content( 'cta', $cta, 1  );
?>
<?php foreach ($get_content as $content): ?>
<div id="call-to-action" class="pt" style="background-image:url('<?php echo esc_url( get_the_post_thumbnail_url( $content['id'] ) ) ; ?>')">
    <div class="container">        
            <div class="entry-container">
                <?php the_category( '', '', $content['id'] ) ?>

                <h2 class="entry-title">
                    <a href="<?php echo esc_url( $content['url'] ) ?>"><?php echo esc_html( $content['title'] ); ?></a>
                </h2>

                <div class="entry-meta clear">
                    <?php return_blog_post_author() ; ?>
                    <?php return_blog_posted_on( $content['id'] ); ?>
                </div>
            </div>       
    </div> 
</div>
<?php endforeach ?>