true, 'category__in' => $cat_id, 'post_type' => 'post', 'posts_per_page' => absint( $options['number_of_team'] ), 'orderby' => 'ASC', ); break; default: break; } if ( 'demo' != $team_content_type && 'custom' != $team_content_type ) { // Fetch posts. $posts = get_posts( $args ); if ( ! empty( $posts ) ) { $i = 1; foreach ( $posts as $key => $post ) { $post_id = $post->ID; $content[ $i ]['name'] = get_the_title( $post_id ); $content[ $i ]['link'] = get_permalink( $post_id ); if ( isset( $options['custom_team_position_'.$i] ) ) { $content[ $i ]['position'] = $options['custom_team_position_'.$i]; } $content[ $i ]['content'] = get_the_excerpt( $post_id ); if ( has_post_thumbnail( $post_id ) ) { $featured_img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); $img_array = $featured_img[0]; } else { $img_array = get_template_directory_uri() . '/assets/uploads/user.png'; } for ( $j=1; $j <= 3; $j++ ) { if ( isset( $options['custom_team_social_url_'.$i.'-'.$j ] ) ) { $content[ $i ]['social_link'][ $j ] = $options['custom_team_social_url_'.$i.'-'.$j ]; } } if ( isset( $img_array ) ) { $content[$i]['img_array'][0] = $img_array; } $i++; } } } if ( ! empty( $content ) ) { $input = $content; } return $input; } endif; // Team section content details. add_filter( 'business_center_pro_filter_team_section_details', 'business_center_pro_get_team_section_details' ); if ( ! function_exists( 'business_center_pro_render_team_section' ) ) : /** * Start team section * * @return string Team content * @since Business Center Pro 2.0.0 * */ function business_center_pro_render_team_section( $content_details = array() ) { $options = business_center_pro_get_theme_options(); if ( empty( $content_details ) ) { return; } ?>

<?php echo esc_attr( $name ); ?>