'post', 'post__in' => ( array ) $post_ids, 'posts_per_page' => 3, 'orderby' => 'post__in', 'ignore_sticky_posts' => true, ); // Run The Loop. $query = new WP_Query( $args ); if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); $page_post['id'] = get_the_id(); $page_post['title'] = get_the_title(); $page_post['url'] = get_the_permalink(); $page_post['excerpt'] = blog_diary_trim_content( 15 ); $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 ); endwhile; endif; wp_reset_postdata(); if ( ! empty( $content ) ) { $input = $content; } return $input; } endif; // must_read_posts section content details. add_filter( 'blog_diary_filter_must_read_posts_section_details', 'blog_diary_get_must_read_posts_section_details' ); if ( ! function_exists( 'blog_diary_render_must_read_posts_section' ) ) : /** * Start must_read_posts section * * @return string must_read_posts content * @since Blog Diary 1.0.0 * */ function blog_diary_render_must_read_posts_section( $content_details = array() ) { $options = blog_diary_get_theme_options(); $read_more = ! empty( $options['must_read_posts_btn_title'] ) ? $options['must_read_posts_btn_title'] : esc_html__( 'Read More', 'blog-diary' ); if ( empty( $content_details ) ) { return; } ?>