/*
Theme Name: Flatsome Child
Theme URI: http://flatsome.uxthemes.com
Template: flatsome
Author: UX-Themes
Author URI: https://uxthemes.com
Description: Multi-Purpose Responsive WooCommerce Theme
Version: 3.19.8.1736799610
Updated: 2025-01-13 20:20:10

*/
function add_featured_image_before_blog_title() {
    if (is_single() && has_post_thumbnail()) { // Check if it's a single post and has a featured image
        ?>
        <div class="entry-image relative">
            <?php the_post_thumbnail('large', ['class' => 'attachment-large size-large wp-post-image']); ?>
        </div>
        <?php
    }
}

// Hook into Flatsome's `flatsome_single_post_header` to show the image before the title
add_action('flatsome_before_blog_post_title', 'add_featured_image_before_blog_title');

