<?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-3 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="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="team-text">
                        <h4 class="inner-area-title" > <?php the_title(); ?></h4>
                        <div class="team-designation"><?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>
                <div class="clearfix"></div>
            </div>

            <!-- inner end -->
            <div class="innour-team ">
                <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 class="team-text">
                        <?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 } ?>
                        </div>
                        <?php } ?> 
                        <div class="clearfix"></div>
                        <div class="team-designation"><?php echo ($team_area_designation); ?></div>
                        <h2 class="inner-area-title"><?php the_title(); ?></h2>
                        
                    </div> 
                <div class="clearfix"></div>
            </div>
            <!-- inner 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-content">
                        <div class="ts-area-c">     
                            <p><?php
                                if (has_excerpt()) {
                                    echo get_the_excerpt();
                                } else {
                                    echo get_the_content();
                                }
                                ?>       
                            </p>    
                        </div>

                    </div>
                    <div class="row mr-0">
                        <div class="col-lg-2 col-md-2 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 class="col-lg-10 col-md-10">
                            <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>
                    <div class="icn-img">
                        <?php 
                            $icn_image = get_theme_mod('icn_image');
                            if(!empty($icn_image)){
                                echo '<img alt="'. esc_html(get_the_title()) .'" src="'.esc_url($icn_image).'" class="img-responsive secondry-bg-img" />';
                            }else{
                                echo '<img  src="'.get_template_directory_uri().'/images/tesicn.png" class="img-responsive svm1" />';
                            }
                        ?> 
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
        
        <?php
    endwhile;
    $text = ob_get_contents();
    ob_clean();
endif;
wp_reset_postdata();
return $text;
}



// 

/*courses*/
function courseShortCode($pageId = null, $isCustomizer = false, $i = null) {

    ob_start();

    $args = array('post_type' => 'our-courses');
    if (!empty($pageId)) {
        $args['page_id'] = absint($pageId);
    }
    $args['posts_per_page'] = -1;
    $colCls = '';
    // if($isCustomizer == true){
    $cols = get_theme_mod('course_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-4 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-course-thumb');


            $post = get_post();

    //Sub Title
        $coursesubtxt = get_post_meta($post->ID, 'coursesubtxt', false);
        $course_subtxt = !empty($coursesubtxt[0]) ? $coursesubtxt[0] : '';

    //STAKING Text
        $courseSTAKING = get_post_meta($post->ID, 'courseSTAKING', false);
        $course_STAKING = !empty($courseSTAKING[0]) ? $courseSTAKING[0] : '';

    //Lessons title
        $courseLessons = get_post_meta($post->ID, 'courseLessons', false);
        $course_Lessons = !empty($courseLessons[0]) ? $courseLessons[0] : '';

    //Lessons title
        $courseDay = get_post_meta($post->ID, 'courseDay', false);
        $course_Day = !empty($courseDay[0]) ? $courseDay[0] : '';

        ?>

        <div class="<?php echo $colCls; ?> single-course-bx "> 
            <div class="single-course">
                <div class="course-bx">
                    <div class="coursetxbx">        
                        <h3 ><?php echo ($course_subtxt); ?></h3>                
                        <a href="<?php the_permalink(); ?>">
                            <h4 class="post-title inner-area-title wow fadeInDown"><?php the_title(); ?></h4>
                        </a>
                        <p>
                            <?php

                                if(has_excerpt()){
                                  echo get_the_excerpt();
                                 }else{
                                  echo luzuk_excerpt( get_the_content() , 130 );
                                 } 
                            ?>
                        </p>
                    </div>
                    <div class="courseimgbx">
                        <a href="<?php the_permalink(); ?>">
                        <?php
                            if (has_post_thumbnail()) {
                                $image_url = $luzuk_image[0];
                            } else {
                                $image_url = get_template_directory_uri() . '/images/courses.jpg';
                            }
                        ?>                 

                            <img class="img-responsive" src="<?php echo esc_url($image_url); ?>" alt="<?php the_title(); ?>" />
                        </a>
                    </div>
                    <div class="row mr-0">
                        <div class="col-md-5 pl-0">
                            <div class="stake"><?php echo ($course_STAKING); ?></div>
                        </div>
                        <div class="col-md-7 pd-0">
                        <?php if($course_Lessons ){ ?> 
                            <li><P><i class="fa fa-file-text-o"> </i> <?php echo ($course_Lessons); ?></P> </li>
                        <?php }?>
                        <?php if($course_Day ){ ?> 
                            <li><p><i class="fa fa-clock-o"> </i> <?php echo ($course_Day); ?></p></li>
                        <?php }?>
                        </div>
                    </div>
                    
                </div>
            </div> 
        </div>
        <!-- inner-page -->
        <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12 inn-single-course-bx ">
            <div class="singleinner-course">
                <?php 
                    $coursetxtlimit = get_theme_mod('coursetxtlimit', '130');
                ?> 
                <div class="course_inbox ">
                    <div class="row mr-0">
                        <div class="col-md-5 col-sm-5">
                            <div class="courseimgbx">
                                <a href="<?php the_permalink(); ?>">
                                   <?php
                                    if (has_post_thumbnail()) {
                                        $image_url = $luzuk_image[0];
                                    } else {
                                        $image_url = get_template_directory_uri() . '/images/courses.jpg';
                                    }
                                    ?>                                                        
                                    <img class="img-responsive" src="<?php echo esc_url($image_url); ?>" alt="<?php the_title(); ?>" />
                                </a>
                            </div>
                        </div>
                        <div class="col-md-7 col-sm-7 pd-0">
                            <div class="coursetxbx">
                                <h3 ><?php echo ($course_subtxt); ?></h3>
                                <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(),$coursetxtlimit );  
                                           }
                                    ?> 
                                </p>      
                            
                            
                                <div class="row mr-0">
                                    <div class="col-md-5 pl-0">
                                        <div class="stake"><?php echo ($course_STAKING); ?></div>
                                    </div>
                                    <div class="col-md-7 pd-0">
                                    <?php if($course_Lessons ){ ?> 
                                        <li><P><i class="fa fa-file-text-o"> </i> <?php echo ($course_Lessons); ?></P> </li>
                                    <?php }?>
                                    <?php if($course_Day ){ ?> 
                                        <li><p><i class="fa fa-clock-o"> </i> <?php echo ($course_Day); ?></p></li>
                                    <?php }?>
                                    </div>
                                </div>
                            </div>
                        </div>
                </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
        <!-- inner-page -->
    <script type="text/javascript">
        var title = 0;
        jQuery("#innerpage-box .course_inbox").each(function(){
          if ($(this).height() > title) { title = $(this).height(); }
        });
        jQuery("#innerpage-box .course_inbox").height(title);


        // on Resize change height

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

            <?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 void
 * @author luzuk <support@luzuk.com>
 * */
    function pricingShortcode() {
      ob_start();
      $cols = get_theme_mod('pricing_npp_count', 2);
      $cols++;
      switch ($cols) {
        case 1:
            $colCls = 'col-lg-12 col-md-12 col-sm-12 col-xs-12';
            break;
            case 2: 
            $colCls = 'col-lg-6 col-md-6 col-sm-6 col-xs-12';
            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 col-xs-12';
            break;
            default: 
            $colCls = 'col-lg-4 col-md-6 col-sm-6 col-xs-12';
            break;
    }

    $showStatic = true;
    for ($i = 1; $i <= $cols; $i++) {
        $PlanPageId = get_theme_mod('pricing_plan_page_' . $i);
        $pricing_page_icon = get_theme_mod('pricing_plan_page_icon_'.$i);
        $planTitle  = get_theme_mod('pricing_plan_name_' . $i, 'STANDARD ');
        //$planunit  = get_theme_mod('pricing_plan_unit_' . $i,'$');
        $planPrice  = get_theme_mod('pricing_plan_price_' . $i,'$29.99');
        $planmonth  = get_theme_mod('pricing_plan_month_' . $i,'PER MONTH');
        $planContent= get_theme_mod('pricing_plan_content_' . $i, '
            <li>Save 20% over monthly billing</li>
            <li>No credit card required</li>
            <li>Unlimited products</li>
            <li>Unlimited products</li>
            <li>Unlimited updates</li>');

        $link = get_theme_mod('pricing_plan_url'.$i);
        $url = get_theme_mod('pricing_plan_url_'.$i, '#');

        if ($PlanPageId || $planTitle  || $planPrice || $planmonth || $planContent || $url || $pricing_page_icon) {
          $showStatic = false;
          ?>

    <div class="<?php echo $colCls; ?> sm-bx">
        <div class="single-pricing  ">
            <div class="stars_an">
                <div class="starsinn"></div>
            </div>
            <div class="pr-s-area">
                <div class="row mr-0">
                    <div class="col-lg-6 left-c pd-0">
                        <div class="titlebx">
                            <h2 class="currency-price"><?php echo ($planPrice); ?></h2>
                            <h1><?php echo ($planmonth); ?></h1>
                        </div>
                    </div>
                    <div class="col-lg-6 pr-0">
                        <?php if($planTitle){ ?>
                        <h4 class="plan-title inner-area-title" > <?php echo ($planTitle); ?> </h4>
                         <?php } ?>

                    </div>
                </div>
            </div>
            <ul class="pricing-list "> <?php echo ($planContent); ?></ul>
        
            <?php
                $pricing_page_id = get_theme_mod('pricing_page');
                $pricing_page_button_title = get_theme_mod('pricing_page_button_title_'.$i, 'Choose Us');
            ?>
            <?php if($pricing_page_button_title){ ?>
                <div class="pc-btn " data-wow-duration="4s">    
                    <a class="btn btn-lg" href="<?php echo esc_url(!empty($url)?$url:'#');?>">
                       <?php echo ($pricing_page_button_title);  ?>
                        <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 32 32" style="enable-background:new 0 0 32 32" xml:space="preserve"><style></style><path d="M7 28a.999.999 0 0 1-1-1V5a1 1 0 0 1 1.521-.854l18 11a1.001 1.001 0 0 1 0 1.708l-18 11A1 1 0 0 1 7 28zM8 6.783v18.434L23.082 16 8 6.783z"/></svg>                             
                        <div class="stars_an">
                            <div class="starsinn"></div>
                        </div>
                    </a>
                </div>
            <?php } ?>
            <div class="btbrd"></div>
             <a class="arrbtn" href="<?php echo esc_url(!empty($url)?$url:'#');?>" >
                <i class="fa fa-angle-right" aria-hidden="true"></i>
                <div class="stars_an">
                    <div class="starsinn"></div>
                </div>
            </a>

        <!--  <div class="clearfix"></div> -->
        </div>
    </div>

    <?php
}
}
if ($showStatic === true) {
  for ($i = 1; $i <= $cols; $i++) {
    $link = get_theme_mod('pricing_plan_url'.$i);
    $url = get_theme_mod('pricing_plan_url_'.$i, '#');

    ?>
        <!-- <div class="<//?php //echo $colCls; ?> plan">
            <div class="pricing-plans">
                <div class="price-box">
                    <div class="price-bx">
                        <div class="plan-cost">$30</div>
                    </div>
                    <div class="clearfix"></div>
                    <h4 class="plan-title">STANDARD</h4>
                    <div class="clearfix"></div>
                    <div class="pri-table-link">
                        <a class="btn" href="#">DETAILS</a>
                    </div>
                </div>
            </div>
        </div>  -->
<?php
}

}

$pricingHtml = ob_get_contents();
        // echo $pricingHtml;
ob_flush();
ob_clean();
}



// ==========================
/*********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; ?> gall-box">  
    <!-- <div class="item wow zoomIn "> -->  
            <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 class="group1" href="</?php echo esc_url($image_url); ?>" title="</?php the_title(); ?>"> -->
                    <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="g-oly"></div>
                        <div class="over-text">
                            <h3 class="inner-area-title "><?php the_title(); ?></h3>
                        </div>
                    </a> 
                </figure>
            </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;
    }

