true, 'orderby' => 'post__in', 'post_type' => 'jetpack-testimonial', 'post__in' => $ids, ); // Fetch posts. $posts = get_posts( $args ); if ( ! empty( $posts ) ) { $i = 1; foreach ( $posts as $key => $post ) { $page_id = $post->ID; if ( has_post_thumbnail( $page_id ) ) { $img_html = get_the_post_thumbnail( $page_id, '', array( 'alt' => the_title_attribute( 'echo=0&post='.$page_id.'' ) ) ); $content[$i]['img_html'] = $img_html; } $content[$i]['url'] = get_permalink( $page_id ); $content[$i]['title'] = get_the_title( $page_id ); $content[$i]['content'] = business_park_trim_content( $post ); if ( isset( $options[ 'testimonial_facebook_'.$i ] ) ) { $content[$i]['facebook'] = $options[ 'testimonial_facebook_'.$i]; } if ( isset( $options[ 'testimonial_twitter_'.$i ] ) ) { $content[$i]['twitter'] = $options[ 'testimonial_twitter_'.$i]; } if ( isset( $options[ 'testimonial_pinterest_'.$i ] ) ) { $content[$i]['pinterest'] = $options[ 'testimonial_pinterest_'.$i]; } $i++; } } if ( ! empty( $content ) ) { $input = $content; } break; default: break; } return $input; } endif; // Testimonial section content details. add_filter( 'business_park_filter_testimonial_section_details', 'business_park_get_testimonial_section_details' ); if ( ! function_exists( 'business_park_render_testimonial_section' ) ) : /** * Start section id .client-carousel * * @return string testimonial content * @since Business Park 1.0.0 * */ function business_park_render_testimonial_section( $content_details = array() ) { $options = business_park_get_theme_options(); if ( empty( $content_details ) ) { return; } ?>