if ('' !== ($subtitle = get_post_meta(get_the_ID(), '_subtitle', true))) {
    ?>
					<span class="entry-subtitle custom custom-2"><?php 
    echo $subtitle;
    ?>
</span>
					<?php 
}
?>
				</a>
			</h1>


			<footer class="entry-meta">
				<?php 
stag_posted_on();
?>
				<?php 
stag_post_reading_time();
?>
				<?php 
edit_post_link(__('Edit', 'stag'), '<span class="edit-link">', '</span>');
?>
			</footer>

			<?php 
if (stag_theme_mod('post_settings', 'post_categories') && stag_categorized_blog() && $categories_list) {
    ?>
			<div class="entry-categories">
				<?php 
    _e('In ', 'stag');
    /**
     * Widget function.
     *
     * @see WP_Widget
     * @access public
     * @param array $args
     * @param array $instance
     * @return void
     */
    function widget($args, $instance)
    {
        if ($this->get_cached_widget($args)) {
            return;
        }
        ob_start();
        extract($args);
        $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
        $count = $instance['count'];
        $post_date = $instance['post_date'];
        $bg_color = $instance['bg_color'];
        $bg_opacity = $instance['bg_opacity'];
        $bg_image = $instance['bg_image'];
        $text_color = $instance['text_color'];
        $link_color = $instance['link_color'];
        $posts = wp_get_recent_posts(array('post_type' => 'post', 'numberposts' => $count, 'post_status' => 'publish'), OBJECT);
        $posts_page = get_option('page_for_posts');
        if ($posts_page == 0) {
            $posts_page = home_url();
        } else {
            $posts_page = get_permalink($posts_page);
        }
        global $post;
        echo $before_widget;
        ?>

		<section class="inner-section">
			<span class="hentry" data-bg-color="<?php 
        echo esc_attr($bg_color);
        ?>
" data-bg-image="<?php 
        echo esc_url($bg_image);
        ?>
" data-bg-opacity="<?php 
        echo esc_attr($bg_opacity);
        ?>
" data-text-color="<?php 
        echo esc_attr($text_color);
        ?>
" data-link-color="<?php 
        echo esc_attr($link_color);
        ?>
"></span>

			<?php 
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>

			<?php 
        foreach ($posts as $post) {
            setup_postdata($post);
            ?>

				<article id="post-<?php 
            the_ID();
            ?>
">
					<header class="entry-header">
						<h1 class="entry-title"><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark"><?php 
            the_title();
            ?>
</a></h1>
					</header><!-- .entry-header -->

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

			<?php 
        }
        ?>
			<?php 
        wp_reset_postdata();
        ?>

			<a href="<?php 
        echo $posts_page;
        ?>
" class="button all-posts"><?php 
        _e('See All Posts', 'stag');
        ?>
</a>
		</section>

		<?php 
        echo $after_widget;
        $content = ob_get_clean();
        echo $content;
        $this->cache_widget($args, $content);
    }