true, 'category__in' => $cat_id, 'post_type' => 'post', 'posts_per_page' => 3, 'orderby' => 'ASC', ); break; default: break; } // Fetch posts. $posts = get_posts( $args ); if ( ! empty( $posts ) ) { $i = 1; foreach ( $posts as $key => $post ) { $post_id = $post->ID; $content[ $i ]['title'] = get_the_title( $post_id ); $content[ $i ]['sub_title'] = business_center_trim_content( 20, $post ); $content[ $i ]['url'] = get_the_permalink( $post_id ); if ( isset( $options['custom_service_icon_'.$i] ) ) { $content[ $i ]['icon'] = $options['custom_service_icon_'.$i]; } $i++; } } if ( ! empty( $content ) ) { $input = $content; } return $input; } endif; // Service section content details. add_filter( 'business_center_filter_service_section_details', 'business_center_get_service_section_details' ); if ( ! function_exists( 'business_center_render_service_section' ) ) : /** * Start service section * * @return string Service content * @since Business Center 1.0.0 * */ function business_center_render_service_section( $content_details = array() ) { $options = business_center_get_theme_options(); if ( empty( $content_details ) ) { return; } ?>