<?php

use Elementor\Utils;

if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly
}
$settings = array(
    'query_type' => 'custom_query',
    'post_types' => 'service',
    'posts_per_page' => $settings['items'],
    'orderby' => 'date',
    'order' => 'DESC',
);

$query_args = tfl_build_query_args($settings);
$query_args = apply_filters('tfl_posts_service_' . $widget_instance->get_id() . '_query_args', $query_args, $settings);
$loop = new \WP_Query($query_args);

if ($loop->have_posts()) :
    echo '<div class="service-shortcode"><div class="row">';
    while ($loop->have_posts()) : $loop->the_post();

        $args['post_id'] = get_the_ID();

        tfl_get_template_part("addons/service/content", $args);

    endwhile;
    echo '</div></div>';
    wp_reset_postdata();

endif;