'page', 'post__in' => ( array ) $page_ids, 'posts_per_page' => absint( $featured_post_count ), 'orderby' => 'post__in', ); // Run The Loop. $query = new WP_Query( $args ); if ( $query->have_posts() ) : $i = 0; while ( $query->have_posts() ) : $query->the_post(); $page_post['title'] = get_the_title(); $page_post['url'] = get_the_permalink(); $page_post['excerpt'] = blogable_trim_content( 20); $page_post['image'] = has_post_thumbnail() ? get_the_post_thumbnail_url( get_the_id(), 'post-thumbnail' ) : get_template_directory_uri() . '/assets/uploads/no-featured-image-600x450.jpg'; // Push to the main array. array_push( $content, $page_post ); $i++; endwhile; endif; wp_reset_postdata(); if ( ! empty( $content ) ) { $input = $content; } return $input; } endif; // featured_post section content details. add_filter( 'blogable_filter_featured_post_section_details', 'blogable_get_featured_post_section_details' ); if ( ! function_exists( 'blogable_render_featured_post_section' ) ) : /** * Start featured_post section * * @return string featured_post content * @since Blogable 1.0.0 * */ function blogable_render_featured_post_section( $content_details = array() ) { $options = blogable_get_theme_options(); if ( empty( $content_details ) ) { return; } ?>