'3',
'no_of_item' => '3',
'show_type' => 'slide',
);
$args = wp_parse_args($attr, $defaults);
$args_arr = array(
'post_type' => 'our-team',
'posts_per_page' => $args['team_no_of_record'],
'order' => 'desc'
);
$fst_teams = new WP_Query($args_arr);
$fst_grid_class = '';
$fst_grid='
';
if($args['show_type'] == 'grid') {
if ( $fst_teams->have_posts()) {
$delay=0.3;
while ( $fst_teams->have_posts() ) {
$fst_teams->the_post();
$fst_designation = get_post_meta(get_the_ID(),'_fst_designation',true);
$fst_fb = esc_url(get_post_meta(get_the_ID(),'_fst_fb',true));
$fst_twitter = esc_url(get_post_meta(get_the_ID(),'_fst_twitter',true));
$github_link = esc_url(get_post_meta(get_the_ID(),'_github_link',true));
$img = get_the_post_thumbnail_url();
$img = ($img=="") ? get_template_directory_uri().
"/fst-framework/fst-customizer/assets/images/default-image.jpg" : $img;
if ($fst_designation) {
$fst_designation = $fst_designation;
}
if ($fst_fb) {
$fst_fb = '
';
}
if ($fst_twitter) {
$fst_twitter = '
';
}
if ($github_link) {
$github_link = '
';
}
$column_class = "col-lg-3 col-md-3 mb-4";
if($args['no_of_item'] == 3) {
$column_class = "col-lg-4 col-md-4 mb-4";
} elseif($args['no_of_item'] == 2) {
$column_class = "col-lg-6 col-md-6 mb-4";
} elseif($args['no_of_item'] == 1) {
$column_class = "col-lg-12 col-md-12 mb-4";
}
$delay=$delay+0.2;
ob_start();
get_template_part('template-parts/addons/ourteam/our-team-grid');
$fst_our_team_contents = ob_get_clean();
$replace = array('{{image}}','{{heading}}','{{content}}','{{designation}}','{{fb_link}}',
'{{twitter_link}}','{{github_link}}','{{column_class}}');
$to = array(esc_url($img),get_the_title(),get_the_content(),$fst_designation,$fst_fb,
$fst_twitter,$github_link,$column_class);
$fst_grid .= str_replace($replace,$to, $fst_our_team_contents);
}
wp_reset_query();
} else {
if(is_user_logged_in()) {
echo "
Click Here to Manage Our Team or
Import demo data of theme.";
}
}
$fst_grid.='
';
return $fst_grid;
} else {
if ( $fst_teams->have_posts() ) {
$attr = apply_filters("aztecs_filter_section_fields",$attr);
$fst_slider = "