diff --git a/includes/classes/NS_Post_Finder.php b/includes/classes/NS_Post_Finder.php index 514b2e1..a2b5c3b 100644 --- a/includes/classes/NS_Post_Finder.php +++ b/includes/classes/NS_Post_Finder.php @@ -282,7 +282,7 @@ public static function render( $name, $value, $options = array() ) { if ( ! empty( $value ) && is_string( $value ) ) { $post_ids = array_map( 'intval', explode( ',', $value ) ); - $posts = new WP_Query( array( + $selected_posts_args = apply_filters( 'post_finder_selected_posts_args', array( 'post_type' => $args['post_type'], 'post_status' => $args['post_status'], 'post__in' => $post_ids, @@ -291,6 +291,7 @@ public static function render( $name, $value, $options = array() ) { 'posts_per_page' => count( $post_ids ), ) ); + $posts = new WP_Query( $selected_posts_args ); $posts = $posts->have_posts() ? $posts->posts : array(); wp_reset_postdata(); } else {