<?php
       
//faq

//team
function teamShortCode($pageId = null, $isCustomizer = false, $i = null) { 

    ob_start();

    $args = array('post_type' => 'our-team');
    if (!empty($pageId)) {
        $args['page_id'] = absint($pageId);
    }
    $args['posts_per_page'] = -1;
    $colCls = '';
    // if($isCustomizer == true){
    $cols = get_theme_mod('team_area_npp_count', 15);
    $cols++;
    switch($cols){
        case 1:
        $colCls = 'col-lg-12 col-md-12 col-sm-12';
        break;
        case 2: 
        $colCls = 'col-lg-6 col-md-6 col-sm-6';
        break;
        case 3:
        case 5:
        case 6:
        case 9:
        case 11:
        case 13:
        case 15:
        $colCls = 'col-lg-4 col-md-6 col-sm-6';
        break;
        default: 
        $colCls = 'col-lg-3 col-md-6 col-sm-6';
        break;
    } 

    // } 
 $text = '';
 $query = new WP_Query($args);
 if ($query->have_posts()):
    $postN = 0;

    while ($query->have_posts()) : $query->the_post();
        $team_area_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'total-team-thumb');
        if ($isCustomizer === true) {
            $team_area_designation = get_theme_mod('team_area_designation' . $i);
            $team_area_facebook = get_theme_mod('team_area_facebook' . $i);
            $team_area_twitter = get_theme_mod('team_area_twitter' . $i);
           // $team_area_linkedin = get_theme_mod('team_area_linkedin' . $i);
            $team_area_instagram = get_theme_mod('team_area_instagram' . $i);
            $team_area_pinterest = get_theme_mod('team_area_pinterest' . $i);
        } else {
            $team_area_facebook = '';
            $team_area_twitter = '';
           // $team_area_linkedin = '';
            $team_area_instagram = '';
            $team_area_pinterest = '';
            $team_area_designation = '';
        }

        $post = get_post();
    //Social media urls
        $teamFacebook = get_post_meta($post->ID, 'teamFacebook', false);
        $team_area_facebook = !empty($teamFacebook[0]) ? $teamFacebook[0] : '';

        $teamTwitter = get_post_meta($post->ID, 'teamTwitter', false);
        $team_area_twitter = !empty($teamTwitter[0]) ? $teamTwitter[0] : '';

        $teamInstagram = get_post_meta($post->ID, 'teamInstagram', false);
        $team_area_instagram = !empty($teamInstagram[0]) ? $teamInstagram[0] : '';

        //$teamlinkedIn = get_post_meta($post->ID, 'teamlinkedIn', false);
        //$team_area_linkedin = !empty($teamlinkedIn[0]) ? $teamlinkedIn[0] : '';

        $teamPinterest = get_post_meta($post->ID, 'teamPinterest', false);
        $team_area_pinterest = !empty($teamPinterest[0]) ? $teamPinterest[0] : '';

    //designation
        $designation = get_post_meta($post->ID, 'designation', false);
        $team_area_designation = !empty($designation[0]) ? $designation[0] : '';

        ?>
        <!--  <div class="<//?php echo $colCls;?> single-team"> -->
        <div class="<?php echo $colCls;?> single-team">
            <div class="our-team ">
                <div class="teamimg">
                    <div class="single-team-img">
                        <?php
                            if (has_post_thumbnail()) {
                                $image_url = $team_area_image[0];
                            } else {
                                $image_url = get_template_directory_uri() . '/images/team-thumb.png';
                            }
                        ?>                  
                        <img src="<?php echo esc_url($image_url); ?>" alt="<?php the_title(); ?>" />
                    </div>
                </div>
                <div class="team-text">
                    <h4 class="inner-area-title wow fadeInLeft" data-wow-duration="1s">
                        <?php the_title(); ?>
                    </h4>
                        
                    <div class="team-designation wow fadeInLeft" data-wow-duration="2s">
                        <?php echo ($team_area_designation); ?>
                    </div>

                    <?php if ($team_area_facebook || $team_area_twitter || $team_area_instagram || $team_area_pinterest) { ?>
                    <div class="team-social-icon">
                        <?php if ($team_area_facebook) { ?>
                        <a target="_blank" href="<?php echo esc_url($team_area_facebook) ?>">
                            <i class="fa fa-facebook"></i></a>
                        <?php } ?>
                        <?php if ($team_area_twitter) { ?>
                            <a target="_blank" href="<?php echo esc_url($team_area_twitter) ?>" ><i class="fa-brands fa-x-twitter"></i></a>
                        <?php } ?>
                        <?php if ($team_area_instagram) { ?>
                            <a target="_blank" href="<?php echo esc_url($team_area_instagram) ?>" ><i class="fa fa-instagram"></i></a> 
                        <?php } ?>
                           <?php if ($team_area_pinterest) { ?>
                            <a target="_blank" href="<?php echo esc_url($team_area_pinterest) ?>"><i class="fa fa-pinterest"></i></a>
                            <?php } ?>
                         <!--  <//?php if ($team_area_linkedin) { ?>
                            <a target="_blank" href="<//?php echo esc_url($team_area_linkedin) ?>" ><i class="fa fa-linkedin"></i></a> 
                        <//?php } ?> -->
                    </div>
                    <?php } ?>
                </div>
                <div class="clearfix"></div>
            </div>
        
    <!-- < inner page >  -->
            <div class="inner-team">
                <div class="inner-teambx" >
                    
                    <div class="teamimg" >
                        <div class="single-team-img">
                            <?php
                                if (has_post_thumbnail()) {
                                    $image_url = $team_area_image[0];
                                } else {
                                    $image_url = get_template_directory_uri() . '/images/team-thumb.png';
                                }
                            ?>                  
                            <img src="<?php echo esc_url($image_url); ?>" alt="<?php the_title(); ?>" />
                            
                            
                            <div class="clearfix"></div>
                        </div>
                    </div>
                    <div class="textbx ">
                            <div class="textbxinn ">
                                <h2 class="inner-area-title"><?php the_title(); ?> </h2>
                                <div class="team-designation ">
                                    <?php echo ($team_area_designation); ?>
                                </div> 
                            </div>

                            <?php if ($team_area_facebook || $team_area_twitter || $team_area_instagram || $team_area_pinterest) { ?>
                            <div class="team-social-icon">
                                <?php if ($team_area_facebook) { ?>
                                <li>
                                    <a target="_blank" href="<?php echo esc_url($team_area_facebook) ?>">
                                    <i class="fa fa-facebook"></i></a>
                                 </li>
                                <?php } ?>
                                <?php if ($team_area_twitter) { ?>
                                 <li>    
                                    <a target="_blank" href="<?php echo esc_url($team_area_twitter) ?>" ><i class="fa-brands fa-x-twitter"></i></a>
                                 </li>
                                <?php } ?>
                                <?php if ($team_area_instagram) { ?>
                                 <li>
                                    <a target="_blank" href="<?php echo esc_url($team_area_instagram) ?>" ><i class="fa fa-instagram"></i></a> 
                                 </li>
                                <?php } ?>
                                <?php if ($team_area_pinterest) { ?>
                                 <li>
                                    <a target="_blank" href="<?php echo esc_url($team_area_pinterest) ?>"><i class="fa fa-pinterest"></i></a>
                                 </li>
                                <?php } ?>

                            </div>
                            <?php } ?>
                    </div>
                <div class="clearfix"></div>
                </div>
            </div>
    <!-- < inner page End >  -->
    <script type="text/javascript">
            var title = 0;
        jQuery("#innerpage-box .inner-team").each(function(){
          if ($(this).height() > title) { title = $(this).height(); }
        });
        jQuery("#innerpage-box .inner-team").height(title);


        // on Resize change height

        jQuery(window).resize(function(){
          jQuery("#innerpage-box .inner-team").height("");
          var title = 0;
          jQuery("#innerpage-box .inner-team").each(function(){
            if ($(this).height() > title) { title = $(this).height(); }
          });
          jQuery("#innerpage-box .inner-team").height(title);
        });
    </script>    
</div>

            <?php
        endwhile;
        $text = ob_get_contents();
        ob_clean();
    endif;
    wp_reset_postdata();
    return $text;
}
/**
 * Use for the show the testimonials at home page and in testimonial page with shortcode
 * @param int $pageId default is null the id of a post
 * @param boolean $isCustomizer default is false if set to true it mean the output is set for the home page
 * @param int $i default null
 * @param boolean $showStaticVals default is false
 * @return string
 * @author luzuk <support@luzuk.com>
 * */
function testimonialShortCode($pageId = null, $isCustomizer = false, $i = null) {

    ob_start();

    $args = array('post_type' => 'our-testimonial');
    if (!empty($pageId)) {
        $args['page_id'] = absint($pageId);
    }
    $colCls = '';
    // if($isCustomizer == true){
    $cols = get_theme_mod('test_npp_count', 5);
    $cols++;
    switch($cols){
        
            }
           $icons = array(1=>'heart', 2=>'star', 3=>'flash', 4=>'bell',5=>'heart', 6=>'star', 7=>'flash', 8=>'bell');     
    // }
    $text = '';
    $query = new WP_Query($args);
    if ($query->have_posts()):
        $postN = 0;

        while ($query->have_posts()) : $query->the_post();
            $luzuk_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'total-team-thumb');
        $post = get_post();

            if (($postN % 3) == 0 && $isCustomizer == false) {
                ?>
                <!-- <div class="clearfix"></div> -->
            <!-- </div> -->
            <!-- <div class="row"> -->
                <?php
            }
            ++$postN;
            ?>
        <div class="item innertest-item ">
            <div class="ts-area-single ">
                <div class="tsarea-inn tsareainn">
                    <div class="ts-area-c">     
                        <p><?php
                            if (has_excerpt()) {
                                echo get_the_excerpt();
                            } else {
                                echo get_the_content();
                            }
                            ?>       
                        </p>    
                    </div>
                    
                    <div class="ts-area-content">
                        <div class="row">
                            <div class="col-lg-9 col-md-9 ">
                                <div class=" ts-area-bx">
                                    <h3 class="ts-area-title "><?php the_title(); ?></h3>
                                    <div class="text-designation">
                                        <?php
                                            $name2 = get_post_meta($post->ID, 'testimonial_Sub_Title', false);
                                            echo (!empty($name2[0])) ? $name2[0] : '';
                                        ?> 
                                        <div class="clearfix"></div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-3 col-md-3 pd-0">
                                <div class="ts-area-thumb">
                                    <div class="testiimginn">
                                        <img src="<?php echo (!empty($luzuk_image[0])) ? $luzuk_image[0] : get_template_directory_uri() . '/images/team-thumb.png' ?>" class="img-responsive" alt="<?php the_title(); ?>" />
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
    
            <!-- innerpage-->
            
            <div class="ts-area-single-inn ">
                <div class=" tsareainn">
                    <!-- <div class="tsareabrd"></div> -->
                    <div class="row mr-0">
                        <!-- <div class=" mts-bx"> -->
                            <div class="row mr-0">
                                <div class=" col-md-9 col-sm-9 pd-0">
                                    <div class=" ts-area-bx">
                                        <h3 class="ts-area-title "><?php the_title(); ?></h3>
                                        <div class="text-designation">
                                            <?php
                                                $name2 = get_post_meta($post->ID, 'testimonial_Sub_Title', false);
                                                echo (!empty($name2[0])) ? $name2[0] : '';
                                             ?> 
                                             
                                        </div>
                                        <div class="clearfix"></div>
                                    </div>
                                </div>
                                <div class=" col-md-3 col-sm-3 pd-0">
                                    <div class="ts-area-thumb">
                                        <img src="<?php echo (!empty($luzuk_image[0])) ? $luzuk_image[0] : get_template_directory_uri() . '/images/team-thumb.png' ?>" class="img-responsive" alt="<?php the_title(); ?>" />
                                        <svg xmlns="http://www.w3.org/2000/svg" width="25.008" height="52.91" viewBox="0 0 25.008 52.91">
                                          <path id="Subtraction_1" data-name="Subtraction 1" d="M-2656-861.089l-25-26.45,25.008-26.46-18.532,26.46L-2656-861.091Z" transform="translate(2681 914)" fill="#f4b504"/>
                                        </svg>
                                    </div>
                                </div>
                            </div>
                             <div class="ts-area-c">         
                                    <p>
                                        <?php
                                        if (has_excerpt()) {
                                            echo get_the_excerpt();
                                        } else {
                                            echo get_the_content();
                                        }
                                        ?> 
                                    </p>  
                                </div> 
                            <div class="clearfix"></div>
                        <!-- </div> -->
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
            <!--innerpage end-->
            <script type="text/javascript">
                    var title = 0;
                jQuery("#innerpage-box .tsareainn").each(function(){
                  if ($(this).height() > title) { title = $(this).height(); }
                });
                jQuery("#innerpage-box .tsareainn").height(title);


                // on Resize change height

                jQuery(window).resize(function(){
                  jQuery("#innerpage-box .tsareainn").height("");
                  var title = 0;
                  jQuery("#innerpage-box .tsareainn").each(function(){
                    if ($(this).height() > title) { title = $(this).height(); }
                  });
                  jQuery("#innerpage-box .tsareainn").height(title);
                });
            </script>
        </div>

        <?php
    endwhile;
    $text = ob_get_contents();
    ob_clean();
endif;
wp_reset_postdata();
return $text;
}


/*services*/
function serviceShortCode($pageId = null, $isCustomizer = false, $i = null) {

    ob_start();

    $args = array('post_type' => 'our-services');
    if (!empty($pageId)) {
        $args['page_id'] = absint($pageId);
    }
    $args['posts_per_page'] = -1;
    $colCls = '';
    // if($isCustomizer == true){
    $cols = get_theme_mod('service_npp_count',3);  
    $services_page_icon1 = get_theme_mod('services_page_icon1'.$i);
    ++$cols;
    switch ($cols) {
        case 1:
        $colCls = 'col-lg-12 col-md-12 col-sm-12';
        break;
        case 2: 
        $colCls = 'col-lg-6 col-md-6 col-sm-6';
        break;
        case 3:
        case 5:
        case 6:
        case 9:
        case 11:
        case 13:
        case 15:
        $colCls = 'col-lg-4 col-md-6 col-sm-6';
        break;
        default: 
        $colCls = 'col-lg-3 col-md-6 col-sm-6';
        break;
        }
    // }
        $text = '';
        $query = new WP_Query($args);
        if ($query->have_posts()):
            $postN = 0;

        while ($query->have_posts()) : $query->the_post();
            $luzuk_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'total-service-thumb');
            $post = get_post();

        ?>

        <div class="<?php echo $colCls; ?> single-service-bx"> 
            <div class="single-service" data-match-height="single-service ">
                <div class="service-icon">
                    <a href="<?php the_permalink(); ?>">
                    <?php
                        if (has_post_thumbnail()) {
                            $image_url = $luzuk_image[0];
                        } else {
                            $image_url = get_template_directory_uri() . '/images/services.jpg';
                        }
                    ?>                                                        
                        <img class="img-responsive" src="<?php echo esc_url($image_url); ?>" alt="<?php the_title(); ?>" />
                        <!-- <div class="s-oly"></div> -->
                   </a>
                   <div class="sec-icn"> 
                        <a href="<?php the_permalink(); ?>"><i class="<?php echo $services_page_icon1; ?>"></i></a>
                    </div> 
                </div>
                <div class="sertxbx">
                    <a href="<?php the_permalink(); ?>">
                        <h4 class="post-title inner-area-title wow fadeInDown"><?php the_title(); ?></h4>
                    </a>
                    <p class="section-area-text">
                        <?php

                            if(has_excerpt()){
                              echo get_the_excerpt();
                             }else{
                              echo luzuk_excerpt( get_the_content() , 80 );
                             } 
                        ?>
                    </p>
                        <?php
                            $ser_button1 = get_theme_mod('ser_button1', 'Read More');
                        ?>
                    <?php if($ser_button1) { ?>
                    <div class="serbtn">  
                        <a href="<?php echo esc_url(get_permalink()); ?>">
                            <span><?php echo $ser_button1 ?></span>
                        </a>
                    </div> 
                    <?php }?>
                </div>
                <div class="clearfix"></div> 
            </div> 
        </div>
        <!-- inner-page -->
        <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12 inn-single-service-bx ">
            <div class="singleinner-service">
                <?php 
                    $sertxtlimit = get_theme_mod('sertxtlimit', '80');
                ?> 
                <div class="service_inbox serviceinbox">
                    <a href="<?php the_permalink(); ?>">
                        <div class="service_inimg">
                           <?php
                            if (has_post_thumbnail()) {
                                $image_url = $luzuk_image[0];
                            } else {
                                $image_url = get_template_directory_uri() . '/images/services.jpg';
                            }
                            ?>                                                        
                            <img class="img-responsive" src="<?php echo esc_url($image_url); ?>" alt="<?php the_title(); ?>" />
                            <div class="serinnolay"></div>     
                        </div>
                    </a>
                    <div class="serbx">
                        <a href="<?php the_permalink(); ?>">
                            <h2 class="title"> <?php the_title(); ?> </h2>
                        </a>
                        <p class="description">
                            <?php 
                               if (has_excerpt()) {
                                          echo get_the_excerpt();
                                      } else {
                                          echo luzuk_excerpt(get_the_content(),$sertxtlimit );  
                                   }
                            ?> 
                           
                        </p>
 
                        <?php
                            $ser_button2 = get_theme_mod('ser_button2', 'Explore more');
                        ?>
                        <?php if($ser_button2) { ?>
                            <div class="serbtn">  
                                <a href="<?php echo esc_url(get_permalink()); ?>">
                                    <span><?php echo $ser_button2 ?></span><svg xmlns="http://www.w3.org/2000/svg" width="50.243" height="13.501" viewBox="0 0 50.243 13.501">
                                  <path id="Icon_ionic-ios-arrow-round-forward" data-name="Icon ionic-ios-arrow-round-forward" d="M20.784,11.51a.919.919,0,0,0-.007,1.294l4.275,4.282h-46.27a.911.911,0,0,0-.907.914.911.911,0,0,0,.907.914H25.045L20.77,23.2a.925.925,0,0,0,.007,1.294.91.91,0,0,0,1.287-.007l5.794-5.836h0a1.026,1.026,0,0,0,.19-.288.872.872,0,0,0,.07-.352.916.916,0,0,0-.26-.64l-5.794-5.836A.9.9,0,0,0,20.784,11.51Z" transform="translate(22.125 -11.252)" fill="#f4b504"></path>
                            </svg>
                                </a>
                            </div> 
                        <?php }?>
                                
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
        <!-- inner-page -->
    <script type="text/javascript">
        var title = 0;
        jQuery("#innerpage-box .service_inbox").each(function(){
          if ($(this).height() > title) { title = $(this).height(); }
        });
        jQuery("#innerpage-box .service_inbox").height(title);


        // on Resize change height

        jQuery(window).resize(function(){
          jQuery("#innerpage-box .service_inbox").height("");
          var title = 0;
          jQuery("#innerpage-box .service_inbox").each(function(){
            if ($(this).height() > title) { title = $(this).height(); }
          });
          jQuery("#innerpage-box .service_inbox").height(title);
        });
    </script>

            <?php
        endwhile;
        $text = ob_get_contents();
        ob_clean();
    endif;
    wp_reset_postdata();
    return $text;
}



// **************************
// ======projects =========
// **************************

function projectShortCode($pageId = null, $isCustomizer = false, $i = null) {

    ob_start();

    $args = array('post_type' => 'our-projects');
    if (!empty($pageId)) {
        $args['page_id'] = absint($pageId);
    }
    $args['posts_per_page'] = -1;
    $colCls = '';
    // if($isCustomizer == true){
    $cols = get_theme_mod('project_npp_count',3);  
    $projects_page_icon1 = get_theme_mod('projects_page_icon1'.$i);

    ++$cols;
    switch ($cols) {
        case 1:
        $colCls = 'col-lg-12 col-md-12 col-sm-12';
        break;
        case 2: 
        $colCls = 'col-lg-6 col-md-6 col-sm-6';
        break;
        case 3:
        case 5:
        case 6:
        case 9:
        case 11:
        case 13:
        case 15:
        $colCls = 'col-lg-4 col-md-6 col-sm-6';
        break;
        default: 
        $colCls = 'col-lg-3 col-md-6 col-sm-6';
        break;
        }
    // }
        $text = '';
        $query = new WP_Query($args);
        if ($query->have_posts()):
            $postN = 0;

            while ($query->have_posts()) : $query->the_post();
                $luzuk_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'total-project-thumb');
                  if ($isCustomizer === true) {
                        $projtsubttle = get_theme_mod('projtsubttle' . $i);
                    } else {
                        $projtsubttle = '';
                    }
                $post = get_post();
                $projtsubttle = get_post_meta($post->ID, 'projtsubttle', false);
                // $projt_area = !empty($projtsubttle[0]) ? $projtsubttle[0] : '';
                // $projectsNum = get_post_meta($post->ID, 'projectsNum', false);
                //$projects_Num = !empty($projectsNum[0]) ? $projectsNum[0] : '';
                ?>
        <div class="<?php echo $colCls;?> single-project-bx">
            <div class="single-project ">
                <div project-match-height="groupName" class="project-icon">
                   <?php
                        if (has_post_thumbnail()) {
                            $image_url = $luzuk_image[0];
                        } else {
                            $image_url = get_template_directory_uri() . '/images/projects.jpg';
                        }
                    ?>
                     <?php
                        $project_link = get_theme_mod('project_link', '');
                    ?>
                    <a href="<?php the_permalink(); ?>">
                    <!-- <div class="project-img"> -->
                        <img class="img-responsive" src="<?php echo esc_url($image_url); ?>" alt="<?php the_title(); ?>" />
                        <div class="oly"></div>
                    <!-- </div>  -->
                    </a>
                </div>
                
                <div class="project-title-box">
                    <a href="<?php the_permalink(); ?>"> 
                        <h2><?php the_title(); ?></h2>
                    </a>
                    <p> <?php
                        if(has_excerpt()){
                          echo get_the_excerpt();
                         }else{
                          echo luzuk_excerpt( get_the_content() , 150 );
                         } 
                        ?>
                    </p>
                </div>
                <div class="clearfix"></div>
            </div>  
            <script type="text/javascript">
                    var title = 0;
                jQuery("#innerpage-box .single-project").each(function(){
                  if ($(this).height() > title) { title = $(this).height(); }
                });
                jQuery("#innerpage-box .single-project").height(title);


                // on Resize change height

                jQuery(window).resize(function(){
                  jQuery("#innerpage-box .single-project").height("");
                  var title = 0;
                  jQuery("#innerpage-box .single-project").each(function(){
                    if ($(this).height() > title) { title = $(this).height(); }
                  });
                  jQuery("#innerpage-box .single-project").height(title);
                });
            </script>
        </div>


        <?php
            endwhile;
            $text = ob_get_contents();
            ob_clean();
        endif;
        wp_reset_postdata();
        return $text;
    }


// ==========================
/*********gallery************/ 
// ==========================

function galleryShortCode($pageId = null, $isCustomizer = false, $i = null) {

    ob_start();

    $args = array('post_type' => 'our-gallery');
    if (!empty($pageId)) {
        $args['page_id'] = absint($pageId);
    }
    $args['posts_per_page'] = -1;
    $colCls = '';
    // if($isCustomizer == true){
    $cols = get_theme_mod('luzuk_gallery_npp_count', 7);  
    ++$cols;
    switch ($cols) {
                    case 1:
                    $colCls = 'col-md-12 col-sm-12 col-xs-12'; 
                    break;
                    case 2:
                    $colCls = 'col-md-6 col-sm-6 col-xs-12';
                    break;
                    case 3:
                    case 5:
                    case 6:
                    case 9:
                    $colCls = 'col-md-4 col-sm-6 col-xs-12';
                    break;
                    case 4:
                    case 7:
                    case 8:
                    case 10:
                    case 11:
                    case 12:
                    $colCls = 'col-md-4 col-sm-6 col-xs-12';
                    break;
                    default:
                    $colCls = 'col-md-4 col-sm-6 col-xs-12';
                    break;
    }
    // }
    $text = '';
    $query = new WP_Query($args);
    if ($query->have_posts()):
        $postN = 0;

        while ($query->have_posts()) : $query->the_post();
            $luzuk_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium_large');
            $post = get_post();
            ?> 

      <div class="<?php echo $colCls; ?> pd-1">  
    <!-- <div class="item "> --> 
        <div class="homegalry"> 
            <div class="lz-gallery-images ">
                <figure class="spa-gall">
                    <?php
                        if (has_post_thumbnail()) {
                            $image_url = $luzuk_image[0];
                        } else {
                            $image_url = get_template_directory_uri() . '/images/about1.jpg';
                        }
                    ?>
                    <a data-fancybox="gallery"  href="<?php echo esc_url($image_url); ?>" title="<?php the_title(); ?>">  
                        <img class="secondry-bg img-responsive" src="<?php echo esc_url($image_url); ?>" alt="<?php the_title(); ?>" />
                        <div class="over-text">
                            <h3 class="inner-area-title "><?php the_title(); ?></h3>
                        </div>
                        <div class="g-oly"></div>
                        <div class="gall-icn">
                            <i class="fa fa-plus"></i>
                        </div>
                    </a> 
                    
                </figure>
                
            </div>
        </div> 
        
        <script type="text/javascript">
                var title = 0;
            jQuery("#innerpage-box .lz-gallery-images").each(function(){
              if ($(this).height() > title) { title = $(this).height(); }
            });
            jQuery("#innerpage-box .lz-gallery-images").height(title);


            // on Resize change height

            jQuery(window).resize(function(){
              jQuery("#innerpage-box .lz-gallery-images").height("");
              var title = 0;
              jQuery("#innerpage-box .lz-gallery-images").each(function(){
                if ($(this).height() > title) { title = $(this).height(); }
              });
              jQuery("#innerpage-box .lz-gallery-images").height(title);
            });
        </script>
    </div>
                <?php
            endwhile;
            $text = ob_get_contents();
            ob_clean();
        endif;
        wp_reset_postdata();
        return $text;
    }
