$content_type, 'post__in' => $content_ids, 'orderby' => 'post__in', 'posts_per_page' => absint( $content_count ), 'ignore_sticky_posts' => true, ); } else { $cat_content_id = get_theme_mod( 'businesity_features_content_category' ); $args = array( 'cat' => $cat_content_id, 'posts_per_page' => absint( $content_count ), ); } $query = new WP_Query( $args ); if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); $data['title'] = get_the_title(); $data['excerpt'] = get_the_excerpt(); $data['permalink'] = get_the_permalink(); array_push( $section_content, $data ); endwhile; wp_reset_postdata(); endif; $section_content = apply_filters( 'businesity_goal_section_content', $section_content ); businesity_render_features_section( $section_content ); /** * Render Features Section. */ function businesity_render_features_section( $section_content ) { $section_title = get_theme_mod( 'businesity_features_section_title', 'Our Features' ); $center_image = get_theme_mod( 'businesity_features_center_image' ); $read_more_label = get_theme_mod( 'charityup_excerpt_more_text', __( 'Read More', 'businesity' ) ); $button_label = get_theme_mod( 'businesity_features_button_label' ); $button_link = get_theme_mod( 'businesity_features_button_link' ); $button_link = ! empty( $button_link ) ? $button_link : '#'; $counter = 1; $first_half = array(); $second_half = array(); $first_half = array_slice( $section_content, 0, 2 ); $second_half = array_slice( $section_content, 2, 4 ); ?>