<?php
$title      = $args['title'];
$content    = $args['content'];
$category    = $args['category'];

$args = array(
    'post_type'           => 'services',
    'post_status'         => 'publish',
    'ignore_sticky_posts' => 1,
    'posts_per_page'      =>-1,
    'orderby'             => 'ASC',
    'order'               => 'ASC',
    'tax_query'           => array(array(
        'taxonomy'      => 'services_categories',
        'field'         => 'slug', //This is optional, as it defaults to 'term_id'
        'terms'         => $category ? $category : '',
        'operator'      => 'IN' // Possible values are 'IN', 'NOT IN', 'AND'.
    ))
);

$the_query = new WP_Query( $args );
?>
<section class="our-value">
    <div class="container">
        <div class="text-content">
            <small class="slide-right"><?php echo $title; ?></small>
            <h2 class="section-innertitle slide-right"><?php echo $content; ?> </h2>
        </div>
        <div class="row">
        <?php
                if ($the_query->found_posts!=0)
                {
                   
                    while ( $the_query->have_posts() ) : $the_query->the_post();
                    $post_id=get_the_ID();
                        $title  = get_the_title();
                        $content = get_the_content(); 
                        $featured_image_url = get_the_post_thumbnail_url($post_id, 'full'); 
                         ?>
            <div class="col-md-4">
                <div class="card slide-up">
                    <div class="img-cont">
                        <img src="<?php echo $featured_image_url; ?>" alt="icon" class="img-fluid" loading="lazy">
                    </div>
                    <div class="text-cont">
                        <h3><?php echo $title; ?></h3>
                        <p>
                        <?php echo $content; ?>
                        </p>
                    </div>
                </div>
            </div>
            <?php
                      
                    endwhile;
                    wp_reset_postdata();
                    wp_reset_query();
                }
                ?>
            
            
        </div>
    </div>
</section>