'latest_posts', 'post_type' => 'post', 'post_status' => $args['post_status'], 'post__in' => $args['post_ids'], // May be empty! 'order' => 'DESC', 'orderby' => 'date', 'posts_per_page' => $args['count'], 'ignore_sticky_posts' => 1, 'no_found_rows' => true, // Improve performance 'update_post_term_cache' => false // Improve performance ); // Author? if ( ! empty( $args['author'] ) ) { $query_args['author_name'] = $args['author']; } // Author IDs? if ( ! empty( $args['author_ids'] ) ) { $query_args['author__in'] = $args['author_ids']; } // Taxonomies? if ( ! empty( $args['taxonomies'] ) ) { $query_args['tax_query'] = fictioneer_get_shortcode_tax_query( $args ); } // Excluded tags? if ( ! empty( $args['excluded_tags'] ) ) { $query_args['tag__not_in'] = $args['excluded_tags']; } // Excluded categories? if ( ! empty( $args['excluded_cats'] ) ) { $query_args['category__not_in'] = $args['excluded_cats']; } // Excluded authors? if ( ! empty( $args['excluded_authors'] ) ) { $query_args['author__not_in'] = $args['excluded_authors']; } // Ignore protected? if ( $args['ignore_protected'] ) { $query_args['has_password'] = false; } // Only protected? if ( $args['only_protected'] ) { $query_args['has_password'] = true; } // Apply filters $query_args = apply_filters( 'fictioneer_filter_shortcode_latest_posts_query_args', $query_args, $args ); // Query post $latest_entries = fictioneer_shortcode_query( $query_args ); // Classes $args['classes'] .= ' _' . $args['post_status']; ?>
have_posts() ) : ?> have_posts() ) : $latest_entries->the_post(); ?> ID, 'shortcode-latest-posts' ); $label = esc_attr( sprintf( _x( 'Continue reading %s', 'Read more link aria label', 'fictioneer' ), $title ) ); if ( ! get_option( 'fictioneer_show_full_post_content' ) && ! strpos( $post->post_content, '' ) ) { $content = '

' . fictioneer_get_excerpt() . '

'; } else { $content = apply_filters( 'the_content', get_the_content( fcntr( 'read_more' ) ) ); } ?>